aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
Commit message (Collapse)AuthorAge
* [MTD] mtdoops printk warning fixesAndrew Morton2007-08-22
| | | | | | | | | | | | drivers/mtd/mtdoops.c: In function 'mtdoops_inc_counter': drivers/mtd/mtdoops.c:109: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' drivers/mtd/mtdoops.c: In function 'mtdoops_console_sync': drivers/mtd/mtdoops.c:277: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' someone buy Dave an x86_64 box. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Revert "[MTD] Driver for AT26Fxxx dataflash devices"David Woodhouse2007-08-03
| | | | | | | | | | | | | This reverts commit 340ea370c2ce89d1c15fbf785460f2f74314ce58. It's not needed given the other m25p80 patch (which now handles at26 "dataflash" as well as most other standard SPI flash chips), and requires a controller driver that won't be merged upstream (supplanted by drivers/spi/atmel_spi.c) ... the submitter of that at91_dataflash26.c driver concurred. Requested by David Brownell <david-b@pacbell.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Merge branch 'master' of ↵David Woodhouse2007-08-01
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * [MIPS] Remove Momentum Ocelot support.Ralf Baechle2007-07-31
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * sun userflash is PCI-dependentAl Viro2007-07-26
| | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | [MTD] [NAND] nand_base.c fix broken linkmaximilian attems2007-08-01
| | | | | | | | | | | | | | | | replace with working link from nand Kconfig help text fixes bugzilla 7815 Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] [ONENAND] onenand_sim.c: make struct info staticAdrian Bunk2007-08-01
| | | | | | | | | | | | | | This patch makes the needlessly global struct info static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [UBI] drivers/mtd/ubi/scan.c: kmalloc + memset conversion to kzallocMariusz Kozlowski2007-08-01
| | | | | | | | | | | | | | | | To be able to convert kmalloc + memset(..., 1, ...) to kzalloc this patch reverses the logic around 'buf'. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] pmcmsp-flash.c: kmalloc + memset conversion to k[cz]allocMariusz Kozlowski2007-08-01
| | | | | | | | | | Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] drivers/mtd/inftlmount.c: kmalloc + memset conversion to kcallocMariusz Kozlowski2007-08-01
| | | | | | | | | | Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] remove redundant/dead code from physmap_of.cMariusz Kozlowski2007-08-01
| | | | | | | | | | | | | | | | This patch removes redundant memset() and dead return line from of_physmap_probe(). No functional change. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] [NAND] fix race in nand_base.cArtem Bityutskiy2007-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | When we mark block bad we have to get chip because this involves writing to the page's OOB. We hit this bug in UBI - we observed random obscure crashes when it marks block bad from the background thread and there is some parallel task which utilizes flash. This patch also adds a TODO note about BBT table protection which it seems does not exist. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Fix do_div() type warning in mtdconcatDavid Woodhouse2007-07-23
| | | | | | | | | | | | It expects a uint64_t; give it one. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Remove useless references to MIPS_HYDROGEN3 and MIPS_MIRAGE_WHY.Robert P. J. Day2007-07-23
| | | | | | | | | | | | Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] [NAND] Fix refactoring of EDB7312 hwcontrol function.Roland Stigge2007-07-23
| | | | | | | | | | | | | | | | | | The patch ensures that the current code (kernel 2.6.22) uses the bits like the code prior to the refactoring. The variable "bits" is employed in a useful way now. Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Remove embedded return in RFD FTL.akpm@linux-foundation.org2007-07-23
| | | | | | | | | | | | | | embedded returns are evil. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Fix potential leak in rfd_ftl_add_mtdFlorin Malita2007-07-23
| | | | | | | | | | | | | | This fixes a leak in the !mtd->erasesize error path (Coverity 1765). Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Clean up duplicate includes in drivers/mtd/Jesper Juhl2007-07-23
| | | | | | | | | | | | | | | | This patch cleans up duplicate includes in drivers/mtd/ Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] [NAND] Add NAND manufacturer AMD.Steven J. Hill2007-07-23
| | | | | | | | | | | | | | This patch adds the manufacturer ID for AMD flash. Signed-off-by: Steven J. Hill <sjhill1@rockwellcollins.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | Merge branch 'master' of ↵David Woodhouse2007-07-23
|\| | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * mm: Remove slab destructors from kmem_cache_create().Paul Mundt2007-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Slab destructors were no longer supported after Christoph's c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * UBI: fix compile warningPaul Mundt2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | cdev.c whines in current git: drivers/mtd/ubi/cdev.c: In function `major_to_device': drivers/mtd/ubi/cdev.c:67: warning: control reaches end of non-void function Shut it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix error handling in erase workerArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | | | | | Do not switch to read-only mode in case of -EINTR and some other obvious cases. Switch to RO mode only when we do not know what is the error. Reported-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix commentsArtem Bityutskiy2007-07-18
| | | | | | | | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: remove unneeded error checksArtem Bityutskiy2007-07-18
| | | | | | | | | | | | Pointed to by viro. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: cleanup usage of try_module_getFernando Luis Vázquez Cao2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | The use of try_module_get(THIS_MODULE) in ubi_get_device_info does not offer real protection against unexpected driver unloads, since we could be preempted before try_modules_get gets executed. It is the caller who should manipulate the refcounts. Besides, ubi_get_device_info is an exported symbol which guarantees protection when accessed through symbol_get. Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix overflow bugVinit Agnihotri2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was experiencing overflows in multiplications for volume->used_bytes in vmt.c & vtbl.c, while creating & resizing large volumes. vol->used_bytes is long long however its 2 operands vol->used_ebs & vol->usable_leb_size are int. So their multiplication for larger values causes integer overflows. Typecasting them solves the problem. My machine & flash details: 64Bit dual-core AMD opteron, 1 GB RAM, linux 2.6.18.3. mtd size = 6GB, volume size= 5GB, peb_size = 4MB. heres patch which does the fix. Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in max_sqnum calculationArtem Bityutskiy2007-07-18
| | | | | | | | | | | | Do not zero max_sqnum after a new volume has been found. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in sqnum calculationBrijesh Singh2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | Hi,I came across problem of having two leb with same sequence no.This happens when we continuously write one block again and again and reboot machine before background thread erases those blocks. The problem here was,when we find two blocks with same sequence no,we take the higher one,but we were not updating max seq no,so next block may have the same seqnum. This patch solves this problem. Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix signed-unsigned multiplicationBrijesh Singh2007-07-18
| | | | | | | | | | | | | | | | | | There is signed multiplication assigned to unsigned ei.addr in io.c. This causes wrong addresses for big multiplication.This patch solves the problem. Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix bug in atomic_leb_change()Artem Bityutskiy2007-07-18
| | | | | | | | | | | | | | atomic_leb_change() is only allowed for dynamic volumes, so set the volume type correctly. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix messageVinit Agnihotri2007-07-18
| | | | | | | | | | | | | | Increase UBI devices couter after the message, not before. Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix debugging stuffArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | Do not check volumes which are currently in use because thay may be in inconsistent state. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in error pathArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | | | | | When volume creation fails, we have to set ubi->volumes[vol_id] back to NULL. This patch also tweaks some debugging stuff. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: use is_power_of_2()Vignesh Babu2007-07-18
| | | | | | | | | | | | | | | | Replacing (n & (n-1)) in the context of power of 2 checks with is_power_of_2 Signed-off-by: Vignesh Babu <vignesh.babu@wipro.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix freeing ubi->vtbl while unloadingVinit Agnihotri2007-07-18
| | | | | | | | | | | | | | | | ubi->vtbl is allocated using vmalloc() in vtbl.c empty_create_lvol(), but it is freed in build.c with kfree() Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in ubi_leb_change()Artem Bityutskiy2007-07-18
| | | | | | | | | | | | | | Do not call 'ubi_wl_put_peb()' if the LEB was unmapped. Reported-by: Gabor Loki <loki@inf.u-szeged.hu> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: kill homegrown endian macrosChristoph Hellwig2007-07-18
| | | | | | | | | | | | | | | | Kill UBI's homegrown endianess handling and replace it with the standard kernel endianess handling. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: cleanup ioctl handlingChristoph Hellwig2007-07-18
| | | | | | | | | | | | | | | | - don't do access_ok + get/put user but use the proper macro - remove useless checks Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: error path bugfixArtem Bityutskiy2007-07-18
| | | | | | | | | | | | No need to unlock the lock, this will be done at out_unlock. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: minor comma fixArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use coma at the the last elements of structure initializer. Daniel Stone's explanation: Because it turns: - .attr = foo + .attr = foo, + .bar = baz into: + .bar = baz, i.e., far less likely to screw up a merge. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: use vmalloc for large buffersArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | UBI allocates temporary buffers of PEB size, which may be 256KiB. Use vmalloc instead of kmalloc for such big temporary buffers. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: add few more commentsArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | Add few comments above ubi_scan_add_used() to explain why it is so complex. Requested by Satyam Sharma <satyam.sharma@gmail.com>. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: set correct gluebi device sizeArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | | | In case of static volumes, make emulated MTD device size to be equivalent to data size, rather then volume size. Reported-by: John Smith <john@arrows.demon.co.uk> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: do not let to read too muchArtem Bityutskiy2007-07-18
| | | | | | | | | | | | | | In case of static volumes it is prohibited to read more data then available. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix error path in create_vtbl()Artem Bityutskiy2007-07-18
| | | | | | | | | | | | | | | | | | | | | | There were several bugs in volume table creation error path. Thanks to Satyam Sharma <satyam.sharma@gmail.com> and Florin Malita <fmalita@gmail.com> for finding and analysing them: http://lkml.org/lkml/2007/5/3/274 This patch makes ubi_scan_add_to_list() static and renames it to add_to_list(), just because it is not needed outside scan.c anymore. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix dereference after kfreeFlorin Malita2007-07-18
| | | | | | | | | | | | | | | | Coverity (CID 1614) spotted new_seb being dereferenced after kfree() in create_vtbl's write_error path. Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix memory leak in checking codeArtem Bityutskiy2007-07-18
| | | | | | | | | | Reported-by: Eric Sesterhenn / Snakebyte <snakebyte@gmx.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * drivers/*: mark variables with uninitialized_var()Jeff Garzik2007-07-17
| | | | | | | | | | | | | | | | Mark variables in drivers/* with uninitialized_var() if such a warning appears, and analysis proves that the var is initialized properly on all paths it is used. Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * drivers/mtd/ubi/eba: minor cleanup: tighten scope of a local varJeff Garzik2007-07-17
| | | | | | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>