Anatolij Gustschin [Thu, 16 Dec 2010 22:42:19 +0000 (23:42 +0100)]
UBI: use mtd->writebufsize to set minimal I/O unit size
Previously we used mtd->writesize field to set UBI's minimal
I/O unit size. This sometimes caused UBIFS recovery issues
when mounting an uncleanly unmounted UBIFS partition on NOR
flash since mtd->writesize is 1 byte for NOR flash. The
MTD CFI driver however often performs writing multiple
bytes in one programming operation using the chip's write
buffer. We have to use the size of this write buffer as
a minimal I/O unit size for UBI on NOR flash to fix the
observed UBIFS recovery issues.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Anatolij Gustschin [Thu, 16 Dec 2010 22:42:18 +0000 (23:42 +0100)]
mtd: initialize writebufsize in the MTD object of a partition
Propagate the writebufsize to the partition's MTD object so
that UBI can set correct value for it's minimal I/O size
using the writebufsize field of MTD object of the partition.
By previous patches we added proper writebufsize field
initialization. Next patch can now change UBI to use
this field for setting the minimal I/O size.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Anatolij Gustschin [Thu, 16 Dec 2010 22:42:17 +0000 (23:42 +0100)]
mtd: onenand: add mtd->writebufsize initialization
Initialize mtd->writebufsize to be equal to mtd->writesize.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Anatolij Gustschin [Thu, 16 Dec 2010 22:42:16 +0000 (23:42 +0100)]
mtd: nand: add mtd->writebufsize initialization
Initialize mtd->writebufsize to be equal to mtd->writesize.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Anatolij Gustschin [Thu, 16 Dec 2010 22:42:15 +0000 (23:42 +0100)]
mtd: cfi: add writebufsize initialization
Initialize mtd->writebufsize to the value obtained
by CFI query command at probe time.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Anatolij Gustschin [Thu, 16 Dec 2010 22:42:14 +0000 (23:42 +0100)]
mtd: add writebufsize field to mtd_info struct
This field will be used to indicate the write buffer size
of the MTD device. UBI will set it's minimal I/O unit size
(min_io_size) to the indicated write buffer size. By this
change we intend to fix failed recovery of UBIFS partitions
we currently observe on NOR flash when mounting the partition
after unclean unmount.
Currently the min_io_size is set to mtd->writesize (which is 1
byte for NOR flash). But flash programming is often done from
prepared write buffer containing multiple bytes and is performed
in one programming operation which could be interrupted by a power
cut or a system reset causing corrupted (partially written) areas
in a flash sector. Knowing the size of potentially corrupted areas
UBIFS scanning and recovery algorithms are able to perform
successful recovery.
In case of NOR flash minimal I/O size must be equal to the
maximal size of the write buffer used by embedded flash
programming algorithm. In case of NAND flash mtd->writebufsize
should be equivalent to mtd->writesize.
The subsequent patches will add mtd->writebufsize initialization
where needed.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Adrian Hunter [Fri, 19 Feb 2010 14:39:53 +0000 (15:39 +0100)]
mtd: OneNAND: OMAP2/3: prevent regulator sleeping while OneNAND is in use
Prevent OneNAND's voltage regulator from going to sleep while
OneNAND is in use, by explicitly enabling and disabling the
regulator as appropriate.
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Adrian Hunter [Fri, 19 Feb 2010 14:39:52 +0000 (15:39 +0100)]
mtd: OneNAND: add enable / disable methods to onenand_chip
Add enable / disable methods called from get_device() / release_device().
These can be used, for example, to allow the driver to prevent the voltage
regulator from being put to sleep while OneNAND is in use.
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Aleksandr Koltsoff [Tue, 4 Jan 2011 08:42:35 +0000 (10:42 +0200)]
mtd: m25p80: Fix JEDEC ID for AT26DF321
The last byte of the ID should be zero for this chip. Was added in
commit
d0e8c47c58575b9131e786edb488fd029eba443e . Reported by Tomi
Varjo.
Signed-off-by: Aleksandr Koltsoff <aleksandr.koltsoff@ebts.fi>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Ralf Rösch [Thu, 30 Dec 2010 09:30:11 +0000 (10:30 +0100)]
mtd: txx9ndfmc: limit transfer bytes to 512 (ECC provides 6 bytes max)
See commit:
c0cbfd0e81d879a950ba6f0df3f75ea30c5ab16e
Using __nand_correct_data() helper function, this driver can read 512
byte (with 6 byte ECC) at a time.
This is correct, but not more:
With NAND chips providing page sizes > 512 Bytes
chip->ecc.bytes are calculated > 6 in txx9ndfmc_nand_scan.
According the data sheet there are (only) 6 bytes ECC available.
After applying the patch a Hynix 512M*8 with 2KiB page size could be
successfully formatted and used with an ubifs file system.
Signed-off-by: Ralf Roesch <ralf.roesch@rw-gmbh.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Guillaume LECERF [Fri, 17 Dec 2010 09:59:47 +0000 (10:59 +0100)]
mtd: cfi_cmdset_0002: add support for Samsung K8D3x16UxC NOR chips
These chips report CFI v3.3 [1], so patch them on the fly to the more
correct v1.3.
Discussed and tested by the OpenWRT people [2].
[1] http://www.samsung.com/global/system/business/semiconductor/product/2007/6/11/NORFlash/32Mbit/K8D3216UBC/ds_K8D3x16UxC_rev17.pdf
[2] https://dev.openwrt.org/ticket/866
Signed-off-by: Guillaume LECERF <glecerf@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Guillaume LECERF [Fri, 17 Dec 2010 09:59:41 +0000 (10:59 +0100)]
mtd: cfi_cmdset_0002: add support for Samsung K8D6x16UxM NOR chips
These chips report CFI v0.0 [1], so extend cfi_fixup_major_minor()
to patch all Samsung chips from 0.0 to 1.0.
Discussed and tested by the OpenWRT people [2].
[1] http://www.samsung.com/global/system/business/semiconductor/product/2007/6/11/NORFlash/64Mbit/K8D6316UTM/ds_K8D6x16UxM_rev16.pdf
[2] https://dev.openwrt.org/ticket/7348
Signed-off-by: Guillaume LECERF <glecerf@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Janusz Krzysztofik [Wed, 15 Dec 2010 14:43:44 +0000 (15:43 +0100)]
mtd: nand: ams-delta: drop omap_read/write, use ioremap
There is a common requirement for not using OMAP specific omap_readw() /
omap_writew() function calls in drivers/, but replace them with
readw() / writew() on ioremap()ped addresses passed from arch/ instead.
The patch implements this idea for the Amstrad Delta NAND driver. To be
able to use the modified driver, the board file is updated with the
platform device I/O resource declaration, which is passed from there.
Created and tested against linux-2.6.37-rc5, on top of recent patch
'MTD: NAND: ams-delta: convert to platform driver'.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Nicolas Ferre [Wed, 15 Dec 2010 11:59:32 +0000 (12:59 +0100)]
mtd: m25p80: add debugging trace in sst_write
Add a DEBUG(MTD_DEBUG_LEVEL2, ..) trace at beginning of sst_write() function as
it is done in m25p80_write() function.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Janusz Krzysztofik [Wed, 15 Dec 2010 11:58:15 +0000 (12:58 +0100)]
mtd: nand: ams-delta: select for built-in by default
Now that the Amstrad Delta NAND driver is converted to a platform driver,
which prevents it from interfering with other unrelated hardware in multiple
OMAP1 cpu and machine configurations, it can be automatically configured for
being built into the kernel if the Amstrad Delta board is also selected.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Adrian Hunter [Fri, 10 Dec 2010 10:04:20 +0000 (12:04 +0200)]
mtd: OneNAND: lighten scary initial bad block messages
Initial bad blocks are normal but the messages look like
errors. Make the messages less scary, make the main
message an informational message not a warning, make the
message displaying registers a debug message and include
the address there instead of in the informational message.
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Adrian Hunter [Wed, 30 Dec 2009 06:40:16 +0000 (07:40 +0100)]
mtd: OneNAND: OMAP2/3: add support for command line partitioning
Add the ability to parse MTD partition information from the
kernel command line.
Note that a pointless BUG_ON is removed, as are redundant
calls to 'del_mtd_partitions()' and 'del_mtd_device()'
because they are also done by 'onenand_release()'.
Finally note that 'add_mtd_device()' returns 1 on failure
so the error condition was incorrect.
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Brian Norris [Sun, 12 Dec 2010 08:23:33 +0000 (00:23 -0800)]
mtd: nand: rearrange ONFI revision checking, add ONFI 2.3
In checking for the ONFI revision, the first conditional (for checking
"unsupported" ONFI) seems unnecessary. All ONFI revisions should be
backwards-compatible; even if this is not the case on some newer ONFI
revision, it should simply fail the second version-checking if-else block
(i.e., the bit-fields for 1.0, 2.0, etc. would not be set to 1). Thus, we
move our "unsupported" condition after having checked each bit field.
Also, it's simple enough to add a condition for ONFI revision 2.3. Note
that this does *NOT* mean we handle all new features of ONFI versions
above 1.0.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Florian Fainelli <ffainelli@freebox.fr>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Brian Norris [Sun, 12 Dec 2010 08:23:32 +0000 (00:23 -0800)]
mtd: nand: choose correct chip name (ONFI bug)
We have the order of the conditional wrong for choosing the ONFI chip name
vs. the ID table name. Without this fix, we will almost *always* choose a
NULL string to print out instead of the correct one.
This has already been suggested by Matthieu Castet.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Florian Fainelli <ffainelli@freebox.fr>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Janusz Krzysztofik [Tue, 14 Dec 2010 20:09:40 +0000 (21:09 +0100)]
mtd: nand: ams-delta: convert to platform driver
In its current form, the driver may interfere with different hardware on
different boards if built into the kernel, hence is not suitable for
inclusion into a defconfig, inteded to be usable with multiple OMAP1 cpu and
machine types.
Convert it to a platform driver, that should be free from this issue.
Created and tested against linux-2.6.37-rc5 on Amstrad Delta.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Tejun Heo [Sat, 11 Dec 2010 16:51:44 +0000 (17:51 +0100)]
mtd: don't use flush_scheduled_work()
flush_scheduled_work() is deprecated and scheduled to be removed.
Directly flush cxt->work_{erase|write} on removal instead.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Kyungmin Park [Mon, 6 Dec 2010 00:05:18 +0000 (09:05 +0900)]
mtd: OneNAND: Fix multi block erase support at 4KiB pagesize
Original 4KiB pagesize chip (SLC) doesn't support Multi block erase at Spec.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Artem Bityutskiy [Tue, 14 Dec 2010 15:07:57 +0000 (17:07 +0200)]
Revert "mtd: nand: add check for out of page read"
This reverts commit
e14feafbe0d5c6d64bb6fe4eba928cb57ac9a4c8.
The commit limits the maximum amount of bytes which can be read
at one go to the OOB size, which is incorrect, because mtd->read_oob()
allows reading multiple pages at a time, see comment near
"struct mtd_oob_ops" at include/linux/mtd/mtd.h. So this patch
breaks ABI and hence, has to be reverted.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Woodhouse [Fri, 3 Dec 2010 16:36:34 +0000 (16:36 +0000)]
mtd: nand: Fix integer overflow in ONFI detection of chips >= 4GiB
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Roman Tereshonkov [Thu, 2 Dec 2010 13:28:38 +0000 (15:28 +0200)]
mtd: onenand: bugfix for 2x mode bad block handling
This bug becomes visible in 2x mode when chip->writesize
is different from mtd->writesize (= 2 * chip->writesize).
At this case the bad block information is read from
the first and the third physical pages instead of
the first and the second as specification states.
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Kyungmin Park [Thu, 2 Dec 2010 00:24:16 +0000 (09:24 +0900)]
mtd: OneNAND: Fix 4KiB pagesize OOB handling
Original 4KiB pagesize chip (SLC) doesn't support OOB operations at Spec.
And it's also same at Flex-OneNAND.
Remove the MLC macro if possible and use 4KiB pagesize macro since MLC has 4KiB pagesize.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Linus Walleij [Mon, 29 Nov 2010 12:52:27 +0000 (13:52 +0100)]
mtd: FSMC NAND fix obvious speling errors
Fix spelling in the interface file.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Linus Walleij [Mon, 29 Nov 2010 12:52:19 +0000 (13:52 +0100)]
mtd: FSMC NAND use the PrimeCell identifier macros
The FSMC actually has a standard ARM PrimeCell ID register, and
the "revision" part of that register contains the thing that
the code is looking at. Reuse the infrastructure from the AMBA
bus abstraction and rid local defines.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Linus Walleij [Mon, 29 Nov 2010 12:52:06 +0000 (13:52 +0100)]
mtd: FSMC NAND remove PARTITION macro and fix compile noise
This removes the PARTITION macro that David didn't like and also
removes a local variable that was dangling unused in some #ifdefs
by being a bit more clever.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Fabio Estevam [Fri, 26 Nov 2010 16:31:44 +0000 (14:31 -0200)]
mtd: fix section mismatch on sst25l
Building the kernel with 'make CONFIG_DEBUG_SECTION_MISMATCH=y´
resulted in:
WARNING: vmlinux.o(.data+0x15938): Section mismatch in reference from
the variable sst25l_driver to the function .init.text:sst25l_probe()
The variable sst25l_driver references
the function __init sst25l_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
Fix the section mismatch.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Fabio Estevam [Tue, 23 Nov 2010 19:02:13 +0000 (17:02 -0200)]
mtd: mxc_nand: Fix warning on nr_parts unused variable
If CONFIG_MTD_PARTITIONS is not selected, then the following warning is generated:
CC drivers/mtd/nand/mxc_nand.o
drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_probe':
drivers/mtd/nand/mxc_nand.c:1014: warning: unused variable 'nr_parts'
Fix it by marking nr_parts as __maybe_unused.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Sergej.Stepanov@ids.de [Tue, 23 Nov 2010 17:38:36 +0000 (18:38 +0100)]
mtd: fsl_elbc_nand: fix jffs2 problem after NAND-flash image record in u-boot
This patch should fix the following problem:
1. the jffs2-image update in the u-boot was ok
2. first restart and first mount of the NAND-flash-partition was also ok
3. before the restart of controller there are no any activity on NAND-flash except of the jffs2_gcd_mtdX-process ...
4. BUT after the second restart the NAND-flash-partition could not be really used after the second mount,
dmesg filled with messages:
...
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x03ce0000: 0xc0ff instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x03d00000: 0xc0ff instead
....
Just for for info:
the behaviour observed on mpc8313-based board with the large-page NAND.
The only activity on NAND-flash was the garbage collector process, that looks for CLEANMARKER-nodes
As Scott said it was broken by commit
3ab8f2a2e7011c5e83363b42950757e46ef06824
Signed-off-by: Sergej Stepanov <Sergej.Stepanov@ids.de>
--
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Roman Tereshonkov [Tue, 23 Nov 2010 12:17:17 +0000 (14:17 +0200)]
mtd: fix master device identification for mtd repartition
Function mtd_has_master renamed as mtd_is_partition to follow the function logic.
The patch fixes the problem of checking the right mtd device for partition creation.
To delete partition checking is not needed here so as it is done in mtd_del_partition.
By master we consider the mtd device which does not belong to any partition.
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Jason Liu [Fri, 19 Nov 2010 08:40:45 +0000 (16:40 +0800)]
mtd: nand: add check for out of page read
When run mtd_oobtest case, there will be one error for step(4),
which turned out it need add one check for out of page read in
nand_do_read_oob just like mtd_do_write_oob did it already.
This commit also fix one typo error for comments in mtd_do_write_oob
Signed-off-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Randy Dunlap [Thu, 18 Nov 2010 23:02:21 +0000 (15:02 -0800)]
mtd: fix nand kernel-doc warnings
Warning(include/linux/mtd/nand.h:543): No description found for parameter 'badblockbits'
Warning(drivers/mtd/nand/nand_bbt.c:1101): No description found for parameter 'mtd'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Guillaume LECERF [Wed, 17 Nov 2010 11:35:50 +0000 (12:35 +0100)]
mtd: cfi_fixup: remove unused 'param' parameter
The 'param' parameter has never been used since its introduction, so
simply remove it.
Signed-off-by: Guillaume LECERF <glecerf@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Dan Carpenter [Mon, 15 Nov 2010 18:20:05 +0000 (21:20 +0300)]
jffs2: typo in comment
It says FB instead of FS (file system).
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Vasiliy Kulikov [Sun, 14 Nov 2010 20:08:39 +0000 (23:08 +0300)]
jffs2: fix error value sign
do_verify_xattr_datum(), do_load_xattr_datum(), load_xattr_datum()
and verify_xattr_ref() should return negative value on error.
Sometimes they return EIO that is positive. Change this to -EIO.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Joe Perches [Fri, 12 Nov 2010 21:37:58 +0000 (13:37 -0800)]
mtd: nand: Use printf extension %pR for struct resource
Using %pR standardizes the struct resource output.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Joe Perches [Fri, 12 Nov 2010 21:37:57 +0000 (13:37 -0800)]
mtd: maps: Use printf extension %pR for struct resource
Using %pR standardizes the struct resource output.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Lars-Peter Clausen [Thu, 11 Nov 2010 18:02:48 +0000 (19:02 +0100)]
mtd: NAND: jz4740: Remove custom {read,write}_page handlers
Now that the mtd core supports more then 64 ecc bytes we can use it instead of
some a custom hack in the jz4740 nand driver.
This patch removes the custom {read,write}_page handlers from the jz4740 nand
driver. Thus the driver will now fallback to the default handlers from the nand
core.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Lars-Peter Clausen [Thu, 11 Nov 2010 18:02:47 +0000 (19:02 +0100)]
mtd: NAND: jz4740: Make 'struct platform_driver jz_nand_driver' static
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Jesper Juhl [Mon, 8 Nov 2010 23:09:02 +0000 (00:09 +0100)]
mtd: remove unnecessary casts of void ptr returning alloc function return values
The [vk][cmz]alloc(_node) family of functions return void pointers which
it's completely unnecessary/pointless to cast to other pointer types since
that happens implicitly.
This patch removes such casts from drivers/mtd/
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Viresh Kumar [Mon, 8 Nov 2010 05:47:54 +0000 (11:17 +0530)]
mtd: fsmc.h: including linux/io.h for definition of readl
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Vasiliy Kulikov [Sat, 6 Nov 2010 14:41:24 +0000 (17:41 +0300)]
mtd: mtdchar: fix information leak to userland
Structure mtd_info_user is copied to userland with padding byted
between "type" and "flags" fields uninitialized. It leads to leaking
of contents of kernel stack memory.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Roman Tereshonkov [Wed, 3 Nov 2010 10:55:21 +0000 (12:55 +0200)]
mtd: onenand: implement cache program feature for 4KiB page onenand
Implement cache program feature for 4KiB page onenand.
This feature improves the write data performance.
The observed 128KiB data program speed change is
from 8827KiB/s to 14156 KiB/s when the feature is enabled.
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Roman Tereshonkov [Wed, 3 Nov 2010 10:55:20 +0000 (12:55 +0200)]
mtd: onenand: fix omap2 code to handle cache program feature
Some fixes are introduced into omap2 code to handle errors when
cache program feature is used.
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Roman Tereshonkov [Wed, 3 Nov 2010 10:55:19 +0000 (12:55 +0200)]
mtd: onenand: add option and variable for cache program feature
A new option is added for cache program feature. A new variable
ongoing is introduced for onenand_chip to handle the multi-command
cache program operation.
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Joe Perches [Fri, 5 Nov 2010 03:08:02 +0000 (20:08 -0700)]
jffs2: use vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Joe Perches [Fri, 5 Nov 2010 03:07:40 +0000 (20:07 -0700)]
mtd: use vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Kyungmin Park [Tue, 2 Nov 2010 01:28:46 +0000 (10:28 +0900)]
mtd: OneNAND: Fix page offset handling at 2KiB pagesize
When use the 2KiB pagesize, it should be set the correct page offset.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
srimugunthan [Sat, 13 Nov 2010 10:46:05 +0000 (12:46 +0200)]
mtd: nandsim: spell fixes in comments
Signed-off-by: srimugunthan <srimugunthan.dhandapani@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Kevin Cernekee [Sun, 31 Oct 2010 04:11:04 +0000 (21:11 -0700)]
mtd: m25p80: Add support for Macronix MX25L25655E
Untested, but expected to be compatible with MX25L25635E which I did
test.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Kevin Cernekee [Sun, 31 Oct 2010 04:11:03 +0000 (21:11 -0700)]
mtd: m25p80: Add support for Macronix MX25L25635E
This is a 256Mbit (32MiB) part so minor changes were made to support
4-byte addressing.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Kevin Cernekee [Sun, 31 Oct 2010 04:11:02 +0000 (21:11 -0700)]
mtd: m25p80: Reinstate error print on unrecognized flash
Commit
b34bc037b26e621e5fc13466767e4da110a7b3d3 removed the
"unrecognized JEDEC id" error message, causing the probe function to
silently abort if the flash ID is unrecognized.
It is desirable to produce diagnostic output in this situation so that
the user has some idea what went wrong.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Grant Likely [Sat, 30 Oct 2010 06:35:02 +0000 (07:35 +0100)]
mtd: Fix MTD_OF_PARTS for all arch and minor tidy of MTD_PARTITIONS
MTD_OF_PARTS should be possible on all architectures, not just
powerpc and microblaze, and it probably should not be a user
selectable option. Neither does it need to be in a separate module.
Also, rework MTD Kconfig to group options dependant on MTD_PARTITIONS
into a if/endif block. Do the same for MTD_REDBOOT_PARTS.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Guillaume LECERF [Fri, 29 Oct 2010 14:17:49 +0000 (16:17 +0200)]
mtd: bcm963xx-flash: try JEDEC probe if CFI fails
Signed-off-by: Guillaume LECERF <glecerf@gmail.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Linus Torvalds [Sat, 30 Oct 2010 15:31:35 +0000 (08:31 -0700)]
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (82 commits)
mtd: fix build error in m25p80.c
mtd: Remove redundant mutex from mtd_blkdevs.c
MTD: Fix wrong check register_blkdev return value
Revert "mtd: cleanup Kconfig dependencies"
mtd: cfi_cmdset_0002: make sector erase command variable
mtd: cfi_cmdset_0002: add CFI detection for SST 38VF640x chips
mtd: cfi_util: add support for switching SST 39VF640xB chips into QRY mode
mtd: cfi_cmdset_0001: use defined value of P_ID_INTEL_PERFORMANCE instead of hardcoded one
block2mtd: dubious assignment
P4080/mtd: Fix the freescale lbc issue with 36bit mode
P4080/eLBC: Make Freescale elbc interrupt common to elbc devices
mtd: phram: use KBUILD_MODNAME
mtd: OneNAND: S5PC110: Fix double call suspend & resume function
mtd: nand: fix MTD_MODE_RAW writes
jffs2: use kmemdup
mtd: sm_ftl: cosmetic, use bool when possible
mtd: r852: remove useless pci powerup/down from suspend/resume routines
mtd: blktrans: fix a race vs kthread_stop
mtd: blktrans: kill BKL
mtd: allow to unload the mtdtrans module if its block devices aren't open
...
Fix up trivial whitespace-introduced conflict in drivers/mtd/mtdchar.c
Linus Torvalds [Sat, 30 Oct 2010 15:26:25 +0000 (08:26 -0700)]
Merge branch 'devel' of /home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (215 commits)
ARM: memblock: setup lowmem mappings using memblock
ARM: memblock: move meminfo into find_limits directly
ARM: memblock: convert free_highpages() to use memblock
ARM: move freeing of highmem pages out of mem_init()
ARM: memblock: convert memory detail printing to use memblock
ARM: memblock: use memblock to free memory into arm_bootmem_init()
ARM: memblock: use memblock when initializing memory allocators
ARM: ensure membank array is always sorted
ARM: 6466/1: implement flush_icache_all for the rest of the CPUs
ARM: 6464/2: fix spinlock recursion in adjust_pte()
ARM: fix memblock breakage
ARM: 6465/1: Fix data abort accessing proc_info from __lookup_processor_type
ARM: 6460/1: ixp2000: fix type of ixp2000_timer_interrupt
ARM: 6449/1: Fix for compiler warning of uninitialized variable.
ARM: 6445/1: fixup TCM memory types
ARM: imx: Add wake functionality to GPIO
ARM: mx5: Add gpio-keys to mx51 babbage board
ARM: imx: Add gpio-keys to plat-mxc
mx31_3ds: Fix spi registration
mx31_3ds: Fix the logic for detecting the debug board
...
Vasiliy Kulikov [Sat, 30 Oct 2010 14:22:49 +0000 (18:22 +0400)]
ipc: shm: fix information leak to userland
The shmid_ds structure is copied to userland with shm_unused{,2,3}
fields unitialized. It leads to leaking of contents of kernel stack
memory.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
wu zhangjin [Sat, 30 Oct 2010 15:19:35 +0000 (08:19 -0700)]
fs/compat.c: fix build on MIPS/s390
The definition of PAGE_CACHE_MASK in <linux/pagemap.h> is needed to use
MAX_RW_COUNT, and on x86-64 that gets done indirectly through the
architecture header includes. But on MIPS and s390 that doesn't happen,
and we need to make sure that fs/compat.c includes pagemap.h explicitly.
Introduced in commit
435f49a518c7 ("readv/writev: do the same
MAX_RW_COUNT truncation that read/write does").
Reported-by: Sachin Sant <sachinp@in.ibm.com> (S390)
Reported-by: wu zhangjin <wuzhangjin@gmail.com> (MIPS)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andres Salomon [Sat, 30 Oct 2010 04:04:19 +0000 (21:04 -0700)]
mtd: fix build error in m25p80.c
While building an x86 distro kernel, I hit the following:
Kernel: arch/x86/boot/bzImage is ready (#7)
ERROR: "of_mtd_parse_partitions" [drivers/mtd/devices/m25p80.ko]
undefined!
of_mtd_parse_partitions is defined with MTD_OF_PARTS, and that's only
built on PPC and microblaze. The code in question should be wrapped w/
a stricter #ifdef.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Woodhouse [Sat, 30 Oct 2010 11:39:21 +0000 (12:39 +0100)]
mtd: Remove redundant mutex from mtd_blkdevs.c
In commit
2a48fc0ab24241755dc93bfd4f01d68efab47f5a ('block: autoconvert
trivial BKL users to private mutex'), Arnd replaced the BKL usage with a
mutex. However, Maxim has already provided a better fix in commit
480792b7bf188c29b8d4b10fee65c3a06ec5dbf7 ('mtd: blktrans: kill BKL'),
which was simply to remove the BKL without replacing it — since he'd
already made it do all necessary locking for itself.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Woodhouse [Sat, 30 Oct 2010 11:35:11 +0000 (12:35 +0100)]
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux-2.6.git
Conflicts:
drivers/mtd/mtd_blkdevs.c
Merge Grant's device-tree bits so that we can apply the subsequent fixes.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Frank Li [Tue, 26 Oct 2010 03:02:19 +0000 (11:02 +0800)]
MTD: Fix wrong check register_blkdev return value
register_blkdev return 1..255 when major = 0.
if (ret ) {
printk(KERN_WARNING "Unable to register %s block device on major %d: %d\n",
tr->name, tr->major, ret);
mutex_unlock(&mtd_table_mutex);
return ret;
}
Above code will return fail when register_blkdev return allocated major number.
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Linus Torvalds [Sat, 30 Oct 2010 01:58:00 +0000 (18:58 -0700)]
Merge branches 'x86-fixes-for-linus' and 'x86-uv-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, alternative: Call stop_machine_text_poke() on all cpus
x86-32: Restore irq stacks NUMA-aware allocations
x86, memblock: Fix early_node_mem with big reserved region.
* 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, uv: More Westmere support on SGI UV
x86, uv: Enable Westmere support on SGI UV
Linus Torvalds [Sat, 30 Oct 2010 01:57:04 +0000 (18:57 -0700)]
Merge branches 'msm-fixes' and 'msm-video' of git://codeaurora.org/quic/kernel/dwalker/linux-msm
* 'msm-fixes' of git://codeaurora.org/quic/kernel/dwalker/linux-msm:
msm: Kconfig: drop unused config options
msm: fix compile failure when no debug uart is selected
msm: fix debug-macro.S build failure
msm: timer: Decrease shift on timer clocksource
arm: mach-msm: fix error handling in msm_iommu_probe()
msm: fix Kconfig target board selection
msm: fix compile failure on struct membank node member
* 'msm-video' of git://codeaurora.org/quic/kernel/dwalker/linux-msm:
drivers/video/msm/mddi.c: Remove multiple KERN_<level> uses
drivers: msm: video: add dev_set_name call
drivers: video: msm: fix hang on disable_irq
Linus Torvalds [Fri, 29 Oct 2010 23:49:34 +0000 (16:49 -0700)]
Merge branch 'for-2637/s3c24xx-all' of git://git.fluff.org/bjdooks/linux
* 'for-2637/s3c24xx-all' of git://git.fluff.org/bjdooks/linux:
ARM: h1940: add UDA1380 to i2c devices list
ARM: h1940: Fix backlight and LCD power functions
ARM: S3C2440: fix boot failure introduced by recent changes in gpiolib
ARM: S3C2440: various fixes in Kconfig file
ARM: rx1950: Add UDA1380 to i2c devices list
ARM: rx1950: Add LEDs support
ARM: rx1950: Add battery device
ARM: h1940: Implement mmc_power function
ARM: h1940: Use gpiolib for latch access
Ben Dooks [Fri, 29 Oct 2010 23:46:55 +0000 (00:46 +0100)]
ARM: Merge for-2637/s3c24xx/misc
Ben Dooks [Fri, 29 Oct 2010 23:46:49 +0000 (00:46 +0100)]
ARM: Merge for-2637/s3c24xx/h1940
Ben Dooks [Fri, 29 Oct 2010 23:46:34 +0000 (00:46 +0100)]
ARM: Merge for-2637/s3c24xx/rx1950
Vasily Khoruzhick [Mon, 27 Sep 2010 06:32:49 +0000 (09:32 +0300)]
ARM: h1940: add UDA1380 to i2c devices list
Register UDA1380 codec during H1940 machine init
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Vasily Khoruzhick [Mon, 27 Sep 2010 06:28:00 +0000 (09:28 +0300)]
ARM: h1940: Fix backlight and LCD power functions
Current implementation of LCD and backlight power control functions
is not complete, as result PDA consumes power in suspend.
Fix this issue by managing state of some latch bits, just like
WinMobile does.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Jason Baron [Thu, 28 Oct 2010 15:20:27 +0000 (11:20 -0400)]
x86, alternative: Call stop_machine_text_poke() on all cpus
Currently, text_poke_smp() passes a NULL as the third argument to
__stop_machine(), which will only run stop_machine_text_poke()
on 1 cpu. Change NULL -> cpu_online_mask, as stop_machine_text_poke()
is intended to be run on all cpus.
I actually didn't notice any problems with stop_machine_text_poke()
only being called on 1 cpu, but found this via code inspection.
Signed-off-by: Jason Baron <jbaron@redhat.com>
LKML-Reference: <
20101028152026.GB2875@redhat.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Abdoulaye Walsimou Gaye [Sat, 16 Oct 2010 11:55:52 +0000 (13:55 +0200)]
ARM: S3C2440: fix boot failure introduced by recent changes in gpiolib
Recent changes in s3c gpio break mini2440 board and may be others.
The problem is that mach-mini2440.c: mini2440_init()
(where we call s3c_gpio_setpull()) is called before s3c2440.c: s3c2440_init()
(where we initialize s3c24xx_gpiocfg_default.set_pull function pointer).
This causes dereferencing of NULL pointer at boot time and a kernel panic.
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Abdoulaye Walsimou Gaye [Sat, 16 Oct 2010 11:55:51 +0000 (13:55 +0200)]
ARM: S3C2440: various fixes in Kconfig file
* kconfig symbols defined in arch/arm/mach-s3c2440/Kconfig are only available
when ARCH_S3C2410 is selected, so no need to make some of them depend
on ARCH_S3C2410.
* fix CPU_S3C24405B typo in "config S3C2440_DMA".
* mini2440: remove unconditionally select of SND_S3C24XX_SOC_S3C24XX_UDA134X.
Those fixes avoid the following warnings at make time:
scripts/kconfig/qconf arch/arm/Kconfig
warning: (MACH_MINI2440 && ARCH_S3C2410) selects SND_S3C24XX_SOC_S3C24XX_UDA134X
which has unmet direct dependencies (SND_S3C24XX_SOC && ARCH_S3C2410)
warning: (CPU_S3C2440 && ARCH_S3C2410 && S3C2410_DMA) selects S3C2440_DMA which
has unmet direct dependencies (ARCH_S3C2410 && CPU_S3C24405B)
warning: (CPU_S3C2440 && ARCH_S3C2410 || CPU_S3C2442 && ARCH_S3C2410)
selects CPU_S3C244X which has unmet direct dependencies (!ARCH_S3C2410)
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Linus Torvalds [Fri, 29 Oct 2010 23:15:57 +0000 (16:15 -0700)]
Merge branch 'for-2637/i2c-all' of git://git.fluff.org/bjdooks/linux
* 'for-2637/i2c-all' of git://git.fluff.org/bjdooks/linux:
i2c-intel-mid: Driver depends on PCI
i2c-intel-mid: support for Moorestown and Medfield platform
i2c-nomadik: fixup bus delays
i2c-nomadik: support smbus emulation
i2c-nomadik: dynamic clocking
i2c-nomadik: documentation fixes
i2c-s3c2410: Enable i2c clock only when doing some transfert
Daniel Walker [Wed, 27 Oct 2010 20:10:34 +0000 (13:10 -0700)]
msm: Kconfig: drop unused config options
These two config options don't exist, and aren't ever going to.
So I simply delete them.
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Daniel Walker [Wed, 27 Oct 2010 20:04:58 +0000 (13:04 -0700)]
msm: fix compile failure when no debug uart is selected
If the board has a debug uart the user is given a choice of which
uart to use. The user can also select NONE, which means not to use one.
In most of our header files when NONE is selected nothing is defined
for MSM_DEBUG_UART_PHYS or MSM_DEBUG_UART_BASE. This causes a compile
failure in debug-macro.S which expect something to be defined there.
Example of the failure,
arch/arm/kernel/built-in.o: In function `hexbuf':
linux-2.6/arch/arm/kernel/debug.S:186: undefined reference to `MSM_DEBUG_UART_PHYS'
linux-2.6/arch/arm/kernel/debug.S:186: undefined reference to `MSM_DEBUG_UART_BASE'
This fixes the compile failure by adding an ifdef to debug-macro.S
that removes all the debug uart code in the case of NONE.
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Daniel Walker [Wed, 27 Oct 2010 22:25:59 +0000 (15:25 -0700)]
msm: fix debug-macro.S build failure
Originally there was an ifdef case to handle when no debug uart
was selected. In commit
0ea1293009826da45e1019f45dfde1e557bb30df
that case was removed which causes the following build failure,
linux-2.6/arch/arm/kernel/debug.S: Assembler messages:
linux-2.6/arch/arm/kernel/debug.S:174: Error: bad instruction `addruart r1,r2'
linux-2.6/arch/arm/kernel/debug.S:176: Error: bad instruction `waituart r2,r3'
linux-2.6/arch/arm/kernel/debug.S:177: Error: bad instruction `senduart r1,r3'
linux-2.6/arch/arm/kernel/debug.S:178: Error: bad instruction `busyuart r2,r3'
linux-2.6/arch/arm/kernel/debug.S:190: Error: bad instruction `addruart r1,r2'
This is a partial revert to add back the case which was removed with
two caveats. First the API for the addruart macro was updated, and
the new addruart case now return 0xfff00000 so that a know IO mapping
is created instead of a random one.
Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Jason Wang <jason77.wang@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Randy Dunlap [Fri, 29 Oct 2010 20:37:09 +0000 (13:37 -0700)]
i2c-intel-mid: Driver depends on PCI
i2c-intel-mid driver uses PCI data structs and interfaces,
so it should depend on PCI. Fixes these build errors:
drivers/i2c/busses/i2c-intel-mid.c:977: error: implicit declaration of function 'pci_request_region'
drivers/i2c/busses/i2c-intel-mid.c:1077: error: implicit declaration of function 'pci_release_region'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Ba Zheng <zheng.ba@intel.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: linux-i2c@vger.kernel.org
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Linus Torvalds [Fri, 29 Oct 2010 22:09:56 +0000 (15:09 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM / Runtime: Fix typo in status comparison causing warning
Linus Torvalds [Fri, 29 Oct 2010 21:43:30 +0000 (14:43 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/rostedt/linux-2.6-kconfig
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig:
kconfig: Have streamline_config process menuconfigs too
kconfig: Fix streamline_config to read multi line deps in Kconfig files
kconfig: Fix missing declaration of variable $dir in streamline_config.pl
kconfig: Fix variable name typo %prompts in streamline_config.pl
kconfig: Make localmodconfig handle environment variables
Linus Torvalds [Fri, 29 Oct 2010 21:17:12 +0000 (14:17 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
b43: Fix warning at drivers/mmc/core/core.c:237 in mmc_wait_for_cmd
mac80211: fix failure to check kmalloc return value in key_key_read
libertas: Fix sd8686 firmware reload
ath9k: Fix incorrect access of rate flags in RC
netfilter: xt_socket: Make tproto signed in socket_mt6_v1().
stmmac: enable/disable rx/tx in the core with a single write.
net: atarilance - flags should be unsigned long
netxen: fix kdump
pktgen: Limit how much data we copy onto the stack.
net: Limit socket I/O iovec total length to INT_MAX.
USB: gadget: fix ethernet gadget crash in gether_setup
fib: Fix fib zone and its hash leak on namespace stop
cxgb3: Fix panic in free_tx_desc()
cxgb3: fix crash due to manipulating queues before registration
8390: Don't oops on starting dev queue
dccp ccid-2: Stop polling
dccp: Refine the wait-for-ccid mechanism
dccp: Extend CCID packet dequeueing interface
dccp: Return-value convention of hc_tx_send_packet()
igbvf: fix panic on load
...
Linus Torvalds [Fri, 29 Oct 2010 21:16:08 +0000 (14:16 -0700)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
Staging: dream: remove dream driver and arch from tree
Linus Torvalds [Fri, 29 Oct 2010 21:15:12 +0000 (14:15 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ecryptfs/ecryptfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
eCryptfs: Print mount_auth_tok_only param in ecryptfs_show_options
ecryptfs: added ecryptfs_mount_auth_tok_only mount parameter
ecryptfs: checking return code of ecryptfs_find_auth_tok_for_sig()
ecryptfs: release keys loaded in ecryptfs_keyring_auth_tok_for_sig()
eCryptfs: Clear LOOKUP_OPEN flag when creating lower file
ecryptfs: call vfs_setxattr() in ecryptfs_setxattr()
Valdis.Kletnieks@vt.edu [Fri, 29 Oct 2010 21:03:46 +0000 (17:03 -0400)]
drivers/dma/Kconfig: add part number for Topcliff.
Product codenames are OK, but once an actual product name is available,
it should be referenced as well.
http://ark.intel.com/chipset.aspx?familyID=52499
Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Greg Kroah-Hartman [Fri, 29 Oct 2010 19:42:18 +0000 (12:42 -0700)]
Staging: dream: remove dream driver and arch from tree
This code is stalled, with no one working on it anymore, and the main
msm code is now going through the proper channels to get merged
correctly.
So remove it as it contains a number of kernel information leaks and it
is doubtful if it even still builds anymore.
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Bryan Huntsman <bryanh@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David S. Miller [Fri, 29 Oct 2010 19:23:15 +0000 (12:23 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
Linus Torvalds [Fri, 29 Oct 2010 18:49:38 +0000 (11:49 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jwessel/linux-2.6-kgdb
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
kgdb,ppc: Individual register get/set for ppc
kgdbts: prevent re-entry to kgdbts before it unregisters
debug_core,x86,blackfin: Clean up hw debug disable API
kdb: Fix early debugging crash regression
kgdb,arm: fix register dump
kdb: fix per_cpu command to remove supress mask
kdb: Add kdb kernel module sample
Linus Torvalds [Fri, 29 Oct 2010 18:47:11 +0000 (11:47 -0700)]
Merge branch 'next' of git://git./linux/kernel/git/kyle/parisc-2.6
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
parisc-agp: fix missing slab.h include
Larry Finger [Thu, 28 Oct 2010 15:43:26 +0000 (10:43 -0500)]
b43: Fix warning at drivers/mmc/core/core.c:237 in mmc_wait_for_cmd
On module removal, the sdio version of b43 generates the following warning:
[ 851.560519] ------------[ cut here ]------------
[ 851.560531] WARNING: at drivers/mmc/core/core.c:237 mmc_wait_for_cmd+0x88/0x90()
[ 851.560534] Hardware name: 20552PG
[ 851.560536] Modules linked in: b43(-) ssb mmc_block binfmt_misc rfcomm sco bnep ppdev l2cap ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp kvm_intel kvm arc4 iwlagn snd_hda_codec_conexant snd_hda_intel snd_hda_codec iwlcore snd_hwdep snd_pcm thinkpad_acpi mac80211 snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq r852 joydev snd_timer sm_common pcmcia nand snd_seq_device cfg80211 sdhci_pci btusb psmouse tpm_tis yenta_socket nand_ids lp snd pcmcia_rsrc nand_ecc bluetooth sdhci tpm pcmcia_core parport mtd snd_page_alloc serio_raw tpm_bios soundcore nvram led_class sha256_generic aes_i586 aes_generic dm_crypt i915 drm_kms_helper drm ahci intel_agp i2c_algo_bit intel_gtt e1000e libahci video agpgart output
[ 851.560620] Pid: 2504, comm: rmmod Not tainted 2.6.36-titan0+ #1
[ 851.560622] Call Trace:
[ 851.560631] [<
c014a102>] warn_slowpath_common+0x72/0xa0
[ 851.560636] [<
c04d94c8>] ? mmc_wait_for_cmd+0x88/0x90
[ 851.560641] [<
c04d94c8>] ? mmc_wait_for_cmd+0x88/0x90
[ 851.560645] [<
c014a152>] warn_slowpath_null+0x22/0x30
[ 851.560649] [<
c04d94c8>] mmc_wait_for_cmd+0x88/0x90
[ 851.560655] [<
c0401585>] ? device_release+0x25/0x80
[ 851.560660] [<
c04df210>] mmc_io_rw_direct_host+0xa0/0x150
[ 851.560665] [<
c04df370>] mmc_io_rw_direct+0x30/0x40
[ 851.560669] [<
c04e06e7>] sdio_disable_func+0x37/0xa0
[ 851.560683] [<
f8dfcb80>] b43_sdio_remove+0x30/0x50 [b43]
[ 851.560687] [<
c04df8cc>] sdio_bus_remove+0x1c/0x60
[ 851.560692] [<
c016d39f>] ? blocking_notifier_call_chain+0x1f/0x30
[ 851.560697] [<
c0404991>] __device_release_driver+0x51/0xb0
[ 851.560701] [<
c0404a7f>] driver_detach+0x8f/0xa0
[ 851.560705] [<
c0403c83>] bus_remove_driver+0x63/0xa0
[ 851.560709] [<
c0405039>] driver_unregister+0x49/0x80
[ 851.560713] [<
c0405039>] ? driver_unregister+0x49/0x80
[ 851.560718] [<
c04dfad7>] sdio_unregister_driver+0x17/0x20
[ 851.560727] [<
f8dfcb42>] b43_sdio_exit+0x12/0x20 [b43]
[ 851.560734] [<
f8dfe76f>] b43_exit+0x17/0x3c [b43]
[ 851.560740] [<
c017fb8d>] sys_delete_module+0x13d/0x200
[ 851.560747] [<
c01fd7d2>] ? do_munmap+0x212/0x300
[ 851.560752] [<
c010311f>] sysenter_do_call+0x12/0x28
[ 851.560757] ---[ end trace
31e14488072d2f7d ]---
[ 851.560759] ------------[ cut here ]------------
The warning is caused by b43 not claiming the device before calling
sdio_disable_func().
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: Arnd Hannemann <arnd@arndnet.de>
Tested-by: Arnd Hannemann <arnd@arndnet.de>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jesper Juhl [Fri, 29 Oct 2010 14:10:26 +0000 (16:10 +0200)]
mac80211: fix failure to check kmalloc return value in key_key_read
I noticed two small issues in mac80211/debugfs_key.c::key_key_read while
reading through the code. Patch below.
The key_key_read() function returns ssize_t and the value that's actually
returned is the return value of simple_read_from_buffer() which also
returns ssize_t, so let's hold the return value in a ssize_t local
variable rather than a int one.
Also, memory is allocated dynamically with kmalloc() which can fail, but
the return value of kmalloc() is not checked, so we may end up operating
on a null pointer further on. So check for a NULL return and bail out with
-ENOMEM in that case.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Paul Fox [Fri, 29 Oct 2010 13:57:28 +0000 (14:57 +0100)]
libertas: Fix sd8686 firmware reload
For the SD8686, we cannot rely on the scratch register to read the firmware
load status, because the same register is used for storing RX packet length.
Broaden the check to account for this.
The module can now be unloaded/reloaded successfully.
Based on the implementation from libertas_tf.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Steve deRosier <steve@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Thu, 28 Oct 2010 14:21:47 +0000 (19:51 +0530)]
ath9k: Fix incorrect access of rate flags in RC
The index variable to access the rate flags should be obtained from the
inner loop counter which corresponds to the rate table structure.This
fixes the invalid rate selection i.e when the supported basic rate is
invalid on a particular band and also the following warning message.
Thanks to Raj for finding this out.
Call Trace:
[<
ffffffff8104ee4a>] warn_slowpath_common+0x7a/0xb0
[<
ffffffff8104ee95>] warn_slowpath_null+0x15/0x20
[<
ffffffffa0583c45>] ath_get_rate+0x595/0x5b0 [ath9k]
[<
ffffffff811a0636>] ? cpumask_next_and+0x36/0x50
[<
ffffffffa0405186>] rate_control_get_rate+0x86/0x160 [mac80211]
[<
ffffffffa040dfac>] invoke_tx_handlers+0x81c/0x12d0 [mac80211]
[<
ffffffffa040eae9>] ieee80211_tx+0x89/0x2b0 [mac80211]
[<
ffffffff812891bc>] ? pskb_expand_head+0x1cc/0x1f0
[<
ffffffffa040edc5>] ieee80211_xmit+0xb5/0x1c0 [mac80211]
[<
ffffffffa041026f>] ieee80211_tx_skb+0x4f/0x60 [mac80211]
[<
ffffffffa03fe016>] ieee80211_send_nullfunc+0x46/0x60 [mac80211]
[<
ffffffffa03f91d7>] ieee80211_offchannel_stop_station+0x107/0x150
[mac80211]
[<
ffffffff812891bc>] ? pskb_expand_head+0x1cc/0x1f0
[<
ffffffffa040edc5>] ieee80211_xmit+0xb5/0x1c0 [mac80211]
[<
ffffffffa041026f>] ieee80211_tx_skb+0x4f/0x60 [mac80211]
[<
ffffffffa03fe016>] ieee80211_send_nullfunc+0x46/0x60 [mac80211]
[<
ffffffffa03f91d7>] ieee80211_offchannel_stop_station+0x107/0x150
[mac80211]
[<
ffffffffa03f8896>] ieee80211_scan_work+0x146/0x600 [mac80211]
[<
ffffffff8133a375>] ? schedule+0x2f5/0x8e0
[<
ffffffffa03f8750>] ? ieee80211_scan_work+0x0/0x600 [mac80211]
[<
ffffffff81064fcf>] process_one_work+0x10f/0x380
[<
ffffffff81066bc2>] worker_thread+0x162/0x340
[<
ffffffff81066a60>] ? worker_thread+0x0/0x340
Cc: stable@kernel.org
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dongdong Deng [Thu, 28 Oct 2010 02:47:00 +0000 (21:47 -0500)]
kgdb,ppc: Individual register get/set for ppc
commit
534af1082329392bc29f6badf815e69ae2ae0f4c(kgdb,kdb: individual
register set and and get API) introduce dbg_get_reg/dbg_set_reg API
for individual register get and set.
This patch implement those APIs for ppc.
Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Dongdong Deng [Tue, 31 Aug 2010 02:06:00 +0000 (21:06 -0500)]
kgdbts: prevent re-entry to kgdbts before it unregisters
The "kgdb_connected" variable of debug_core just indicates whether or
not kgdbts is connected to the debug_core. It does not completely
prevent a script from trying invoke kgdbts again and possibly crashing
the system (see Call Trace below).
The configured variable in kgtbts can be used instead of
kgdb_connected instead of kgdb_connected. The cleanup_kgdbts() can
also be removed because there is no possible way to build kgdbts as a
kernel module that you could unload with rmmod.
Call Trace:
-----------------------------------------------------------------
root:/$ echo kgdbts=V1S1000 > /sys/module/kgdbts/parameters/kgdbts
kgdb: Unregistered I/O driver kgdbts, debugger disabled.
------------[ cut here ]------------
WARNING: at kernel/debug/debug_core.c:1002
kgdb_unregister_io_module+0xec/0x100()
Hardware name: Moon Creek platform
Modules linked in:
Pid: 664, comm: sh Not tainted 2.6.34.1-WR4.0.0.0_standard #58
Call Trace:
[<
c103b1ed>] warn_slowpath_common+0x6d/0xa0
[<
c1079fdc>] ? kgdb_unregister_io_module+0xec/0x100
[<
c1079fdc>] ? kgdb_unregister_io_module+0xec/0x100
[<
c10544e0>] ? param_attr_store+0x0/0x20
[<
c103b235>] warn_slowpath_null+0x15/0x20
[<
c1079fdc>] kgdb_unregister_io_module+0xec/0x100
[<
c124e4ea>] cleanup_kgdbts+0x1a/0x20
[<
c124eced>] param_set_kgdbts_var+0x6d/0xb0
[<
c124ec80>] ? param_set_kgdbts_var+0x0/0xb0
[<
c10544f7>] param_attr_store+0x17/0x20
[<
c105457c>] module_attr_store+0x2c/0x40
[<
c111fe84>] sysfs_write_file+0x94/0xf0
[<
c10d42f6>] vfs_write+0x96/0x130
[<
c111fdf0>] ? sysfs_write_file+0x0/0xf0
[<
c10d44d6>] sys_write+0x46/0xd0
[<
c13bf329>] system_call_done+0x0/0x4
---[ end trace
4eb028c6ee43154c ]---
kgdb: Unregistered I/O driver kgdbts, debugger disabled.
-----------------------------------------------------------------
[jason.wessel@windriver.com: remove cleanup_kgdbts() ]
Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Dongdong Deng [Wed, 18 Aug 2010 11:02:00 +0000 (06:02 -0500)]
debug_core,x86,blackfin: Clean up hw debug disable API
The kgdb_disable_hw_debug() was an architecture specific function for
disabling all hardware breakpoints on a per cpu basis when entering
the debug core.
This patch will remove the weak function kdbg_disable_hw_debug() and
change it into a call back which lives with the rest of hw breakpoint
call backs in struct kgdb_arch.
Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Jason Wessel [Fri, 29 Oct 2010 18:14:41 +0000 (13:14 -0500)]
kdb: Fix early debugging crash regression
The kdb_current legally be equal to NULL in the early boot of the x86
arch. The problem pcan be observed by booting with the kernel arguments:
earlyprintk=vga ekgdboc=kbd kgdbwait
The kdb shell will oops on entry and recursively fault because it
cannot get past the final stage of shell initialization.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Rabin Vincent [Tue, 26 Oct 2010 17:49:00 +0000 (12:49 -0500)]
kgdb,arm: fix register dump
DBG_MAX_REG_NUM incorrectly had the number of indices in the GDB regs
array rather than the number of registers, leading to an oops when the
"rd" command is used in KDB.
Cc: stable@kernel.org
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>