aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2007-04-25[JFFS2] Tidy up licensing/copyright boilerplate.David Woodhouse45-217/+155
In particular, remove the bit in the LICENCE file about contacting Red Hat for alternative arrangements. Their errant IS department broke that arrangement a long time ago -- the policy of collecting copyright assignments from contributors came to an end when the plug was pulled on the servers hosting the project, without notice or reason. We do still dual-license it for use with eCos, with the GPL+exception licence approved by the FSF as being GPL-compatible. It's just that nobody has the right to license it differently. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-25[MTD] [OneNAND] Exit loop only when column start with 0Adrian Hunter1-2/+2
The JFFS2 requests OOB function from column 0. But the oobtest in nand-tests doesn't. So we only exit loop only when column start with 0. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-25[MTD] [OneNAND] Fix access the past of the real oobfree arrayKyungmin Park1-5/+12
Here it's not the case: all the entries are occupied by OOB chunks. Therefore, once we get into a loop like for (free = this->ecclayout->oobfree; free->length; ++free) { } we might end up scanning past the real oobfree array. Probably the best way out, as the same thing might happen for common NAND as well, is to check index against MTD_MAX_OOBFREE_ENTRIES. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-25[MTD] [OneNAND] Update Samsung OneNAND official URLKyungmin Park1-1/+1
Update Samsung OneNAND official URL. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-25[JFFS2] Better fix for all-zero node headersJoakim Tjernlund2-15/+5
No need to check for all-zero header since the header cannot be zero due to other checks. Replace the all-zero header check in readinode.c with a check for the magic word. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-25[JFFS2] Improve read_inode memory usage, v2.David Woodhouse3-599/+618
We originally used to read every node and allocate a jffs2_tmp_dnode_info structure for each, before processing them in (reverse) version order and discarding the ones which are obsoleted by later nodes. With huge logfiles, this behaviour caused memory problems. For example, a file involved in OLPC trac #1292 has 1822391 nodes, and would cause the XO machine to run out of memory during the first stage of read_inode(). Instead of just inserting nodes into a tree in version order as we find them, we now put them into a tree in order of their offset within the file, which allows us to immediately discard nodes which are completely obsoleted. We don't use a full tree with 'fragments' pointing to the real data structure, as we do in the normal fragtree. We sort only on the start address, and add an 'overlapped' flag to the tmp_dnode_info to indicate that the node in question is (partially) overlapped by another. When the scan is complete, we start at the end of the file, adding each node to a real fragtree as before. Where the node is non-overlapped, we just add it (it doesn't matter that it's not the latest version; there is no overlap). When the node at the end of the tree _is_ overlapped, we sort it and all its overlapping nodes into version order and then add them to the fragtree in that order. This 'early discard' reduces the peak allocation of tmp_dnode_info structures from 1.8M to a mere 62872 (3.5%) in the degenerate case referenced above. This version of the patch also correctly rememembers the highest node version# seen for an inode when it's scanned. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-23[JFFS2] Improve failure mode if inode checking leaves unchecked space.David Woodhouse1-1/+2
We should never find the unchecked size is non-zero after we've finished checking all inodes. If it happens, used to BUG(), leaving the alloc_sem held and deadlocking. Instead, just return -ENOSPC after complaining. The GC thread will die, but read-only operation should be able to continue and the file system should be unmountable. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-23[JFFS2] Fix cross-endian build.David Woodhouse2-3/+12
When compiling a LE-capable JFFS2 on PowerPC, wbuf.c fails to compile: fs/jffs2/wbuf.c:973: error: braced-group within expression allowed only inside a function fs/jffs2/wbuf.c:973: error: initializer element is not constant fs/jffs2/wbuf.c:973: error: (near initialization for ‘oob_cleanmarker.magic’) fs/jffs2/wbuf.c:974: error: braced-group within expression allowed only inside a function fs/jffs2/wbuf.c:974: error: initializer element is not constant fs/jffs2/wbuf.c:974: error: (near initialization for ‘oob_cleanmarker.nodetype’) fs/jffs2/wbuf.c:975: error: braced-group within expression allowed only inside a function fs/jffs2/wbuf.c:976: error: initializer element is not constant fs/jffs2/wbuf.c:976: error: (near initialization for ‘oob_cleanmarker.totlen’) Provide constant_cpu_to_je{16,32} functions, and use them for initialising the offending structure. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-22[MTD] Finish conversion mtd_blkdevs to use the kthread APIChristoph Hellwig1-23/+9
Remove waitqueue, 'exiting' flag and completion; use kthread APIs instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-20[JFFS2] Obsolete dirent nodes immediately on unlink, where possible.Joakim Tjernlund1-2/+1
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-19Use menuconfig objects: MTDJan Engelhardt6-78/+52
Use menuconfigs instead of menus, so the whole menu can be disabled at once instead of going through all options. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-19[MTD] mtd_blkdevs: Convert to use the kthread APIEric W. Biederman1-14/+5
thread_run is used intead of kernel_thread, daemonize, and mucking around blocking signals directly. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] Fix fwh_lock lockingShashi Rao1-1/+2
This is on a custom board with a mapping driver access to an ST M50LPW080 chip. This chip is probed successfully with do_map_probe("jedec_probe",...). If I use the mtdchar interface to perform unlock->erase->program->lock on any of the 16 eraseblocks in the chip, the chip is left in FL_STATUS mode while the data structures believe that the chip is in FL_READY mode. Hence, any subsequent reads to any flash byte results in 0x80 being read. Signed-off-by: Shashi Rao <shashi@sun.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[JFFS2] Speed up mount for directly-mapped NOR flashJoakim Tjernlund1-4/+11
Remove excessive scanning of empty flash after a clean marker for users of the point/unpoint method. cfi_cmdset_0001 uses point/unpoint by default iff flash mapping is linear. The speedup is several orders of magnitude if FS is less than half full. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[JFFS2] fix buffer sise calculations in jffs2_get_inode_nodes()Artem Bityutskiy1-65/+33
In read inode we have an optimization which prevents one min. I/O unit (e.g. NAND page) to be read more then once. Namely, at the beginning we do not know which node type we read, so we read so we assume we read the directory entry, because it has the smallest node header. When we read it, we read up to the next min. I/O unit, just because if later we'll need to read more, we already have this data. If it turns out to be that the node is not directory entry, and we need more data, and we did not read it because it sits in the next min. I/O unit, we read the whole next (or several next) min. I/O unit(s). And if it happens to be that we read a data node, and we've read part of its data, we calculate partial CRC. So if later we need to check data CRC, we'll only read the rest of the data from further min. I/O units and continue CRC checking. This code was a bit messy and buggy. The bug was that it assumed relatively large min. I/O unit, so that the largest node header could overlap only one min. I/O unit boundary. This parch clean-ups the code a bit and fixes this bug. The patch was not tested on flash with small min. I/O unit, like NOR-ECC, nut it was tested on NAND with 512 bytes NAND page, so it at least does not break NAND. It was also tested with mtdram so it should not break NOR. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[JFFS2] Disable summary after wbuf recoveryAdrian Hunter1-0/+3
After a write error, any data in the write buffer must be relocated. This is handled by the jffs2_wbuf_recover function. This function does not fix up the erase block summary information that is collected for writing at the end of the block, which results in an incorrect summary (or BUG if the summary was found to be empty). As the summary is not essential (it is an optimisation), it may be disabled for the current erase block when this situation arises. This patch does that. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[JFFS2] Prevent list corruption when handling write errorsAdrian Hunter1-0/+5
If a write error occurs, the affected block is placed on the bad_used_list. In the case that the write error occured when writing summary data the block was also being placed on the dirty_list, which caused list corruption and ultimately a soft lockup in jffs2_mark_node_obsolete. This fixes that. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] nandsim: enhance nandsim to allow arbitrary NAND sizeAdrian Hunter1-1/+20
A new module parameter has been added called 'overridesize', which overrides the size that would be determined by the ID bytes. 'overridesize' is specified in erase blocks and as the exponent of a power of two e.g. 5 means a size of 32 erase blocks. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] nandsim: Enhance nandsim optionally to report wear informationAdrian Hunter1-0/+99
A new module parameter 'rptwear' specifies how many erases between reporting wear information. Zero means never. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] nandsim: enhance nandsim to simulate flash errorsAdrian Hunter1-1/+300
New module parameters have been added to nandsim to simulate: bitflips random bit flips badblocks blocks that are initially marked bad weakblocks blocks that fail to erase after a small number of erase cycles weakpages pages that fail to write after a small number of successful writes gravepages pages that fail to read after a small number of successful reads Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] nandsim: add partition capability to nandsimAdrian Hunter1-24/+73
Enhance nandsim to be able to create more than 1 partition. A new module parameter 'parts' may be used to specify partition sizes. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[JFFS2] fix deadlock on error pathArtem Bityutskiy1-1/+1
When the MTD driver returns write failure, the following deadlock occurs: We are in __jffs2_flush_wbuf(), we hold &c->wbuf_sem. Write failure. jffs2_wbuf_recover()->jffs2_reserve_space_gc()->jffs2_do_reserve_space() ->jffs2_erase_pending_blocks()->jffs2_flash_read() and it tries to lock &c->wbuf_sem again. Deadlock. Reported-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] [NAND] Casting bug in nand_default_block_markbadAndre Renaud1-1/+1
There is a slight bug in nand_default_block_markbad, where the offset is cast to an integer, prior to being shifted. This means that on large offsets, it is incorrectly doing a signed shift & losing bits. Fixed this by doing the cast after the shift (as is done elsewhere in the code). Signed-off-by: Andre Renaud <andre@bluewatersys.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] Driver for AT26Fxxx dataflash devicesHans-Jürgen Koch3-0/+494
Add support for AT26Fxxx dataflash devices. These devices have a quite different commandset than the AT45xxx chips, which are handled by at91_dataflash.c, so a combined driver turned out to be more ugly than useful. Tested only on AT26F004. Signed-off-by: Hans-Jürgen Koch <hjk@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] Fix length comparison in MEMREADOOBThomas Gleixner1-1/+1
The ops.len member is not initialized, because it is unused for this operation. The length check needs to use ops.ooblen instead Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] [NAND] Move ancient NAND chip support into a config optionThomas Gleixner2-0/+12
The support for obsolete ancient NAND chips adds .data size and one of the old ids conflicts with a modern one. Make the support for such chips depending on a config option. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] [NAND] Use ecc.read/write_page_raw consequentlyThomas Gleixner1-2/+2
Use the functions in the ecc structure instead of the default ones, so the override by the board driver is effective also for software ecc code paths. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD][NAND] Add Micron Manufacturer IDsshahrom@micron.com2-0/+2
Add Micron Manufacturer ID. Signed-off-by: Shahrom Sharif <sshahrom@micron.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[JFFS2] check node crc before doing anything elseThomas Gleixner1-15/+15
Check the node CRC on scan before doing anything else with the node. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] Fix dependencies for MIPS MTD driversRalf Baechle1-3/+3
o A dependency on the processor architecture does not make sense; delete it. o The Alchemy and MTX drivers requires MTD_PARTITIONS and MTD_CFI to work, make those dependencies. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-17[MTD] Alchemy cleanupsRalf Baechle1-9/+0
Delete RCS $Id string and unused debug code. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-02[MTD] [NOR] Support for auto locking flash on power upRodolfo Giometti2-3/+91
Auto unlock sectors on resume for auto locking flash on power up. Signed-off-by: Rodolfo Giometti <giometti@enneenne.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-02[JFFS2] Delete everything related to obsolete JFFS2_PROC optionRobert P. J. Day2-148/+0
Delete everything related to the apparently non-existent kernel config option JFFS2_PROC. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-02[MTD] PMC MSP71xx flash/rootfs mappingsMarc St-Jean4-0/+324
Add flash and rootfs mappings for the PMC-Sierra MSP71xx devices. This patch references some platform support files previously submitted to the linux-mips@linux-mips.org list. Signed-off-by: Marc St-Jean <Marc_St-Jean@pmc-sierra.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/joern/miscDavid Woodhouse1-58/+9
2007-03-23[MTD] Delete unused header file linux/mtd/iflash.h.Robert P. J. Day1-98/+0
Delete the unreferenced header file include/linux/mtd/iflash.h. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-23[MTD] [NAND] Remember timing settings for CAFÉ NAND controller.David Woodhouse1-14/+11
We'll need them for suspend/resume. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-10[JFFS2] Remove superfluous source file fs/jffs2/comprtest.cRobert P. J. Day1-307/+0
Delete the obsolete source file fs/jffs2/comprtest.c. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-09Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds5-19/+31
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [IPV6] fix ipv6_getsockopt_sticky copy_to_user leak [IPV6]: Fix for ipv6_setsockopt NULL dereference [DCCP]: Initialise write_xmit_timer also on passive sockets [IPV4]: Fix rtm_to_ifaddr() error handling.
2007-03-09Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6Linus Torvalds14-245/+783
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] refresh config files [IA64] put kdump_find_rsvd_region in __init [IA64] Remove sparse warning from unwind code [IA64] add missing syscall trace clear [IA64] Cleanup in crash.c [IA64] kexec: declare ia64_mca_pal_base in mca.h rather than kexec.h [IA64] pci_get_legacy_ide_irq should return irq (not GSI) [IA64] whitespace fixes for include/asm-ia64/sal.h [IA64] Cache error recovery [IA64] Proper handling of TLB errors from duplicate itr.d dropins
2007-03-09Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds4-18/+16
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: kobject: new_device->kref wasn't putted after error in kobject_move() driver core: export device_rename Remove devfs from MAINTAINERS Driver core: add device symlink back to sysfs Revert "driver core: refcounting fix"
2007-03-09Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds4-14/+15
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: pci: fix section mismatch warning PCI: aer: fix section mismatch warning pcie: fix section mismatch warning PCI: allow multiple calls to pcim_pin_device()
2007-03-09Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds18-127/+186
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (23 commits) USB Elan FTDI: check for workqueue creation USB: fix spinlock recursion in cdc-acm.c USB: fix Unaligned access in EHCI driver USB: Product ID for FT232RL in ftdi_sio USBNET: DM9501: Add Corega FEther USB-TXC support. USB: ipaq.c: Additional devices USB: further fix for usb-serial USB: fix usb-serial device naming bug USB: RTS/DTR signal patch for airprime driver USB: ftdi_sio: use port_probe / port_remove thereby fixing access to the latency_timer usb-serial: fix shutdown / device_unregister order USB: add Additional PIDs in ftdi_sio USB: add QL355P power supply ids to fdti_sio USB: New device IDs for cp2101 driver USB: kill dead code from hub.c USB: ratelimit debounce error messages USB: pxa2xx_udc: fix hardcoded irq number UHCI: fix port resume problem USB: set the correct interval for interrupt URBs USB: goku_udc: Remove crude cache coherency code ...
2007-03-09Pull misc-for-upstream into release branchLen Brown7-31/+32
2007-03-09Pull bugzilla-8110 into release branchLen Brown1-17/+23
2007-03-09Pull bugzilla-8066 into release branchLen Brown1-2/+23
2007-03-09Pull bugzilla-7907 into release branchLen Brown1-0/+7
2007-03-09Pull bugzilla-7570 into release branchLen Brown1-6/+7
2007-03-09Pull bugzilla-6859 into release branchLen Brown1-2/+23
2007-03-09Pull bugzilla-6316 into release branchLen Brown1-47/+73