aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-12-26UBI: add some more commentsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: tweak volumes lockingArtem Bityutskiy
Transform vtbl_mutex to volumes_mutex - this just makes code easier to understand. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: improve internal interfacesArtem Bityutskiy
Pass volume description object to the EBA function which makes more sense, and EBA function do not have to find the volume description object by volume ID. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: bugfix: dont oops with NULL module parameterArtem Bityutskiy
E.g., it oopsed in case of: modprobe ubi mtd = 0 Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: remove ubi_devices_cntArtem Bityutskiy
This global variablea is not really needed, remove it Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: create ubi_wl_entry slab on initializationArtem Bityutskiy
Similarly to ltree_entry_slab, it makes more sense to create and destroy ubi_wl_entry slab on module initialization/exit. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: create ltree_entry slab on initializationArtem Bityutskiy
Since the ltree_entry slab cache is a global entity, which is used by all UBI devices, it is more logical to create it on module initialization time and destro on module exit time. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: improve error messagesArtem Bityutskiy
Always print error code with error messages, sometimes it is extremely helpful info. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: remove redundant fieldArtem Bityutskiy
Remove redundant ubi->major field - we have it in ubi->cdev.dev already. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: minor tidy-upsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: silence a warningJesper Juhl
This patch silences the following warning : drivers/mtd/ubi/vmt.c:73: warning: 'ret' may be used uninitialized in this function gcc can't see that we always initialize ret in all situations where it is actually used. The one case where it's not initialized is when we BUG(), but gcc doesn't know that we won't then continue and use an uninitialized 'ret'. This patch results in code that does exactely the same as before, but it also makes gcc shut up, so we generate one less line of warning noise. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: add ubi_leb_map interfaceArtem Bityutskiy
The idea of this interface belongs to Adrian Hunter. The interface is extremely useful when one has to have a guarantee that an LEB will contain all 0xFFs even in case of an unclean reboot. UBI does have an 'ubi_leb_erase()' call which may do this, but it is stupid and ineffecient, because it flushes whole queue. I should be re-worked to just be a pair of unmap, map calls. The user of the interfaci is UBIFS at the moment. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: bugfix: allocate mandatory EBs firstArtem Bityutskiy
First allocate the necessary eraseblocks, then the optional ones. Otherwise it allocates all PEBs for bad EB handling, and fails on then following EBA LEB allocation. Reported-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26UBI: fix error code in ubi_io_read()Artem Bityutskiy
When NAND detects an ECC error, it returns -EBADMSG. It does not stop reading requested data if one page has an ECC error, it keeps going and reads all the requested data. If it fails to read all the data, it does not return -EBADMSG, but returns the error code which reflects the reason of the failure. But some drivers may have bugs (e.g., OneNAND had) and stop reading after the first ECC error, so it returns -EBADMSG. In turn, UBI propagates this up to the caller. The caller will treat this as "all the requested data was read, but there was an ECC error". So we change the error code to -EIO if it is -EBADMSG and the read length is less then the requested length. We also add an assertion, so if UBI debugging is enabled, UBI will bug. Pointed-to-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-03[MTD] mtdoops cleanupPeter Korsgaard
Use memcpy instead of open coding a copy loop. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] mtdoops: Document usage in KconfigPeter Korsgaard
Add usage instructions to Kconfig for mtdoops driver. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] [NAND] Marvell Orion device bus NAND controllerTzachi Perelstein
Driver for the device bus NAND controller in the Marvell Orion family of ARM SoCs. Signed-off-by: Tzachi Perelstein <tzachi@marvell.com> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Jörn Engel <joern@logfs.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] [NOR] Attempt to clean up the JEDEC unlock address confusionDavid Woodhouse
Use a single unlock address, adjust it for the device type in the knowledge that it'll be adjusted back again. This has the desirable effect of masking out the least significant bit of the address for x16 devices. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] [NOR] Fix overflow check in jedec_probeDavid Woodhouse
Having laid the code out so that it's easier to read instead of sticking to the 80-column guideline even when it doesn't make sense, a bug is immediately spotted... we were only checking _one_ of the unlock addresses to see if it runs off the end of the map. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] [NOR] Clean up jedec_probe, remove unlock address arraysDavid Woodhouse
This should have no functional effects -- we've been ignoring all but the first address in the array for a long time, and using it only to indicate which device types are supported. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-12-03[MTD] Always initialise mutex in new mtd_blktrans_dev.David Woodhouse
We were only initialising the mutex in the case where the new device was automatically allocated the highest minor number. If the caller specified a minor number, or if it filled in a free slot which was made by a previous device deregistering, the mutex wouldn't get initialised when we jumped out of the loop. Reported by Monte Copeland <catboat@texas.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-29[MTD] [NAND] pasemi_nand driverEgor Martovetsky
Plumbing for NAND connected via localbus on PA Semi PWRficient-based boards. From: Egor Martovetsky <egor@pasemi.com> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-28[MTD] [NAND] S3C2410 correctly set nFCE over resumeBen Dooks
Ensure the nFCE line is de-asserted over suspend and then re-initialised when the system resumes. This is to ensure that the NAND is kept in lowest power mode over suspend (power settings are only specified for nFCE inactive) as well as fixing the Simtec Osiris which relies on nFCE being inactive. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-28[MTD] fix CONFIG_MTD_SHARP_SL if CONFIG_MTD=m Stanislav Brabec
Sharp Zaurus SL-C3200 with CONFIG_MTD=m and CONFIG_MTD_SHARP_SL=y (as it is bool) lost support for the ROM flash. With CONFIG_MTD=y it has no problems. It is caused by losing of compiled code of drivers/mtd/maps/sharpsl-flash.o. It was linked to drivers/mtd/maps/built-in.o and drivers/mtd/built-in.o, but lost and not linked to drivers/built-in.o (because CONFIG_MTD!=y). Patch below fixes this problem by creating sharpsl-flash.ko (and the code works correctly as a module). Signed-off-by: Stanislav Brabec <utx@penguin.cz> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-28[MTD] mtd_dataflash: Incorrect compare-after-write checkAndrew Victor
After writing to a Dataflash page, the built-in compare operation is used to check that the page was successfully written. A logic bug in checking the results of the comparison currently causes the compare to never fail. This bug was originally in the legacy at91_dataflash.c driver. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-28[JFFS2] Fix return value check for mtd->point() in check_node_data()Alexey Korolev
If we ask it to map 'len' bytes of the device, don't compare against some other number and whine that it's different. That's a little silly. Signed-off-by: Alexey Korolev <akorolev@infradead.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-26[MTD] [NOR] Prevent erase command invocation on suspended chipAlexander Belyakov
while running stress tests we have met cfi_cmdset_0001.c driver issue. Working on multipartitional devices with erase suspend on write feature enabled it is possible to get erase operation invoked on chip with suspended erase. get_chip() looses information about earlier suspended erase and new erase operation gets issued. New erase operations report successful completion, but blocks remain dirty causing, for example, JFFS2 error messages like: ... Newly-erased block contained word 0x20031985 at offset 0x00200000 Newly-erased block contained word 0x20031985 at offset 0x00280000 Newly-erased block contained word 0x20031985 at offset 0x00240000 ... The patch below fixes that issue. Signed-off-by: Alexander Belyakov <alexander.belyakov@intel.com> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-26[MTD] [OneNAND] Do not stop reading for ECC errorsAdrian Hunter
When an ECC error occurs, the read should be completed anyway before returning -EBADMSG. Returning -EBADMSG straight away is incorrect. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-23[MTD] [NOR] Support Intel P3x flash support with CFI version 1.5Alexey Korolev
Signed-off-by: Alexey Korolev <akorolev@infradead.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-21[JFFS2] Fix data CRC checking on NOR flash.David Woodhouse
We were failing to check the data CRC on data nodes on non-writebuffered flash, which led to "interesting" behaviour on unclean shutdowns. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-09[MTD] [NOR] Add support for the SST 39VF1601 flash chipDavid Howells
Add support for the SST 39VF1601 flash chip. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-06[MTD] Provide mtdram.h with mtdram_init_device() prototypeJesper Nilsson
This is used by axisflashmap.c to boot from ram. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-06[JFFS2] make jffs2_get_acl() staticAdrian Bunk
jffs2_get_acl() can now become static again. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: KaiGai Kohei <kaigai@ak.jp.nec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-06[JFFS2] Fix misapplied patch causing compile breakageDavid Woodhouse
Somehow, the patch in commit 15953580e79b58caefb107e77f218e009b9992e6 was misapplied and part of the old list-traversal remained. Remove it. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-01[JFFS2] Don't strip sgid bit from inode permissionsDavid Woodhouse
<viro> dwmw2: anyway, removing sgid from directories or from files without S_IXGRP is a plain and simple bug <viro> these days you don't need that logics at all - simply remove it Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-11-01[JFFS2] Improve getdents vs. f_pos handling on NOR flash.David Woodhouse
Commit a491486a2087ac3dfc00efb4f838c8d684afaf54 started obliterating dirents directly on the medium, when jffs2_can_mark_obsolete(). Removing them immediately from the f->dents list, however, screws up handling of f_pos within a directory -- because the offset is equivalent to the number of entries through the list we are, and the existence of deletion dirents served to provide 'placeholders' for unlinked entries. Now, 'rm -r' doesn't even manage to unlink everything in the directory. Revert to keeping 'deletion' dirents in the list, at least in memory even though we no longer write anything to the medium. Spotted, debugged and mostly fixed by Joakim Tjernlund Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-30[MTD] [NOR] More CFI fixups for Atmel chipsHans-Christian Egtvedt
Convert CFI tables from Atmel cmdset_0001 chips to Intel format and set BufWrite timeouts to 0 for Atmel cmdset_0001 and cmdset_0002 chips. Some chips may indicate support for buffered writes even though they only support dual-word writes. The CFI fixup must run before fixup_use_write_buffers for this to work. Signed-off-by: Håvard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-30MTD: small physmap_of partition parsing fixesValentine Barshak
Use of_get_next_child for proper ref counting as suggested by Stephen Rothwell and remove add_mtd_partitions from parse_partitions to avoid duplicate mtd device registration for RedBoot partitions. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Heckled-for-on-IRC-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-30[MTD] [NAND] Add Blackfin BF52x support in bf5xx_nand driverMichael Hennerich
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-28[MTD] Skip bad blocks when checking for RedBoot partition tableDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-28[MTD] [NAND] Check for RedBoot partitions on CAFÉ NANDDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: ide: add SH-S202J to ivb_list[] drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings drivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=n hpt366: fix build for CONFIG_HOTPLUG=n cy82c693: fix build for CONFIG_HOTPLUG=n
2007-10-27duplicate initializer in sound/pci/hda/patch_realtek.cAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27fix breakage in pegasos_ethAl Viro
Fix fallout from commit b45d9147f1582333e180e1023624c003874b7312 ("mv643xx_eth: Remove unused register defines") Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: x86: Dump filtering supports x86_64 sparsemem x86: fix compiler warnings in arch/x86/kernel/early-quirks.c x86: fix !SMP compiler warning in arch/x86/kernel/acpi/processor.c x86: Fix boot protocol KEEP_SEGMENTS check. x86: voyager: fix bogus conversion to per_cpu for boot_cpu_info x86: export smp_ops to allow modular build of KVM Revert "i386: export i386 smp_call_function_mask() to modules"
2007-10-27cirrusfb nonsenseAl Viro
(pointer > 0) is deeply weird; (pointer >= 0) is even dumber... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27scatterlist fallout: mmcAl Viro
#include <scatterlist/scatterlist.h> is an odd thing to do... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27ide/arm/icside: fallout from commit 86f3a492bb09eee5745b93af35f2212179c251fdAl Viro
struct device doesn't have ->dma; it's in struct expansion_card where that struct device is embedded into. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27scatterlist fallout: frvAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27x86: Dump filtering supports x86_64 sparsememKen'ichi Ohmichi
This patch adds the symbol "init_level4_pgt" to the vmcoreinfo data so that makedumpfile (dump filtering command) supports x86_64 sparsemem kernel of linux-2.6.24. makedumpfile creates a small dumpfile by excluding unnecessary pages for the analysis. It checks attributes in page structures and distinguishes necessary pages and unnecessary ones. To check them, makedumpfile gets the vmcoreinfo data which has the minimum debugging information only for dump filtering. For older x86_64 kernel (linux-2.6.23 or before), makedumpfile translates the virtual address of page structure into physical address by subtracting PAGE_OFFSET from virtual address, but this translation isn't effective for linux-2.6.24 sparsemem kernel, because its page structures are in virtual memmap area. makedumpfile should translate their virtual address by 4-levels paging and it needs the symbol "init_level4_pgt". Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>