aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/write.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2005-05-23[MTD] NAND: Use cond_resched instead of msleepThomas Gleixner1-2/+2
Replace msleep by cond_resched. On machines with HZ=100 (e.g. ARM) msleep slows down the operation by factor 10 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Fix NOR specific scan BUG Artem B. Bityuckiy3-10/+15
Fix fairly sad NOR-specific bug - during FS building ic->scan_dents isn't zero, but jffs2_mark_node_obsolete() migt be called it tries to finde the ic corresponding to ref - this requires ic->scan_dents = 0. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Prevent ino cache removal for inodes in useDavid Woodhouse5-16/+24
Don't remove inocache for inodes which are in read_inode() or clear_inode() until they're done. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Replace all the Au1x mapping drivers with a simplified single driverPete Popov7-867/+199
This driver does not have as many options but it's easier to maintain. And, it turns out AMD never shipped boards with different flash densities. Signed-off-by: Pete Popov <ppopov@pacbell.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Use after free, found by the Coverity toolJoern Engel1-3/+3
Signed-off-by: Alexander Nyberg <alexn@dsv.su.se> Signed-off-by: Joern Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND: Check command timeoutThomas Gleixner1-11/+26
Check timeout while we wait for the command to finish. No worry about a false result. This prevents deadlocking when detecting an unknown number of chips and is useful for removable media too. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] DiskOnChip: Wait for the command to finish.Thomas Gleixner1-2/+9
Do not use the ready function here, as it might hang for ever. The result will show, whether the chip is there or not Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Sparse fixesBen Dooks1-9/+11
Fix sparse errors due to lack of address-space markers Updated header comments Small re-format of initialiser Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Fix unregister_mtd_user() public function documentation.Artem B. Bityuckiy1-3/+3
Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Update BAST driver configurationBen Dooks1-4/+5
update the BAST driver config (which already supports the vr1000) to be selected only if the vr1000 has been configured Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Make OTP actually work.Nicolas Pitre1-3/+5
The OTP code is rather broken without this. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Fix node lookupArtem B. Bityuckiy1-3/+3
Look the ref->next_phys field instead of ->next_in_ino to determine if the block has more then one node. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND: Fix bad block table scan for small page devicesArtem B. Bityuckiy1-29/+30
Scan 1st and 2nd pages of SP devices for BB marker by default. Fix more then one page scanning in create_bbt.c. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Quiet unused variable warningNicolas Pitre1-2/+2
Signed-off-by: Nioclas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND: Early Manufacturer ID lookupKyungmin Park2-12/+11
Move manufacturer ID search to display correct ID in case of buswidth mismatch. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Add SST 39VF1601 (MPF+) IDBen Dooks1-1/+17
Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Fixup probing logic for single 16bit devicesBen Dooks1-1/+11
The change to the generic probe to look for the smallest width of chip first is causing some problems on boards with a single 16bit device. The problem seems to be the jedec_match() is truncating the device-id read from the table to match against the one read from the hardware, causing a match against the partial id of some chips with 16bit IDs (such as the SST39LF160) This fixes things for my own board, but something may need to be done if the same problem is exhibited for chips with an 8bit ID Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND: Read only OOB bytes during bad block scanArtem B. Bityuckiy1-14/+38
When scanning NAND for bad blocks, don't read the whole page, read only needed OOB bytes instead. Also check the return code of the nand_read_raw() function. Correctly free the this->bbt array in case of failure. Tested with Large page NAND. Fix debugging message. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND: Allow operation without bad block tableArtem B. Bityuckiy1-2/+3
Small bugfix. Sometimes it may be handy not to have bbt. So, this->bbt might be NULL. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND: Skip bad block table scan on requestThomas Gleixner2-3/+8
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Use a single config option for write buffer supportAndrew Victor9-70/+35
This patch replaces the current CONFIG_JFFS2_FS_NAND, CONFIG_JFFS2_FS_NOR_ECC and CONFIG_JFFS2_FS_DATAFLASH with a single configuration option - CONFIG_JFFS2_FS_WRITEBUFFER. The only functional change of this patch is that the slower div/mod calculations for SECTOR_ADDR(), PAGE_DIV() and PAGE_MOD() are now always used when CONFIG_JFFS2_FS_WRITEBUFFER is enabled. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Add support for JFFS2-on-Dataflash devices.Andrew Victor9-17/+98
For Dataflash, can_mark_obsolete = false and the NAND write buffering code (wbuf.c) is used. Since the DataFlash chip will automatically erase pages when writing, the cleanmarkers are not needed - so cleanmarker_oob = false and cleanmarker_size = 0 DataFlash page-sizes are not a power of two (they're multiples of 528 bytes). The SECTOR_ADDR macro (added in the previous core patch) is replaced with a (slower) div/mod version if CONFIG_JFFS2_FS_DATAFLASH is selected. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Core changes required to support JFFS2-on-Dataflash devices.Andrew Victor5-44/+53
DataFlash page-sizes are not a power of two (they're multiples of 528 bytes). There are a few places in JFFS2 code where sector_size is used as a bitmask. A new macro (SECTOR_ADDR) was defined to calculate these sector addresses. For non-DataFlash devices, the original (faster) bitmask operation is still used. In scan.c, the EMPTY_SCAN_SIZE was a constant of 1024. Since this could be larger than the sector size of the DataFlash, this is now basically set to MIN(sector_size, 1024). Addition of a jffs2_is_writebuffered() macro. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Unabuse file-f_mode for OTP purposeNicolas Pitre1-21/+27
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] User interface to Protection RegistersNicolas Pitre2-4/+120
This is implemented using a ioctl to switch the MTD char device into one of the different OTP "modes", at which point read/write/seek can operate on the selected OTP area. Also some extra ioctls to query for size and lock protection segments or groups. Some example user space utilities are provided. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Support for protection register support on Intel FLASH chipsNicolas Pitre8-127/+369
This enables support for reading, writing and locking so called "Protection Registers" present on some flash chips. A subset of them are pre-programmed at the factory with a unique set of values. The rest is user-programmable. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Prevent deadlock during write buffer recoveryEstelle Hammache1-4/+8
Prevent deadlock when checking erased block for space allocation during wbuf recovery. Signed-off-by: Estelle Hammache <estelle.hammache@st.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Add OTP basiscNicolas Pitre2-4/+14
add structure definition for OTP region info Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] amd_flash: Fix chip ID clashJonas Holmberg1-13/+1
* Removed table entry for AM29BDS643D, since device ID clashes with AM29DL640G and both chips support CFI. Signed-off-by: Jonas Holmberg <jonas.holmberg@axis.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Remove NAND dependencies for NOR FLASHDavid Woodhouse1-1/+7
make NAND code work on NOR flash again Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] DiskOnChip: big endian fix for NFTL devicesThomas Gleixner1-1/+5
Make NFTL devices work on big endian machines. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] DiskOnChip code cleanupThomas Gleixner1-16/+3
Remove commented ugliness Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] DiskOnChip use CONFIG_ options instead of random symbolsThomas Gleixner1-5/+5
Using the CONFIG_ options from KConfig seems to work better :8 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Code cleanup Estelle Hammache3-47/+28
Code beautification and block filing correction for optimization. Signed-off-by: Estelle Hammache <estelle.hammache@st.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Fix MTD device probingRussell King1-2/+2
Try larger numbers of chips before smaller numbers of chips across the bus width. This means we'll avoid misdetecting a 2 x16 array as 1 x32 if the high 16-bits happen to read as zeros in the QRY area. Signed-off-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Fix refile of blocks due to write failure. Estelle Hammache1-3/+6
avoid segfault when nextblock was refiled because of a write failure - avoid filing blocks on the clean list when they have wasted space Signed-off-by: Estelle Hammache <estelle.hammache@st.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Fix block refilingEstelle Hammache1-18/+47
- block refiling when writing directly to flash a buffer which is bigger than wbuf - retry cases for flushing wbuf Signed-off-by: Estelle Hammache <estelle.hammache@st.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Fix write buffer retry caseEstelle Hammache1-1/+32
Correction of retry case to avoid silent failure of rmdir when jffs2_wbuf_recover GCs the previous entry (+ corresponding dnode case). Signed-off-by: Estelle Hammache <estelle.hammache@st.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] rtc_from4 error status check, disable virtual erase blocksDavid A. Marlin1-5/+89
Added routine to perform extra error status checks on erase and write failures to determine if errors are correctable. Added option to prevent JFFS2 from using virtual erase blocks. Performed minor cleanup on whitespace and comments. Signed-off-by: David A. Marlin <dmarlin@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND Add optional ECC status check callbackDavid A. Marlin2-13/+68
Add optional hardware specific callback routine to perform extra error status checks on erase and write failures for devices with hardware ECC. Signed-off-by: David A. Marlin <dmarlin@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Platform RAM DriverBen Dooks4-2/+334
Driver for generic RAM blocks which are exported by an platform_device from the device driver system. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND use symbols instead of literalsDavid A. Marlin1-7/+7
Replace some literals with defined symbols. Signed-off-by: David A. Marlin <dmarlin@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND SharpSL fix default partition sizeRichard Purdie1-2/+2
Correct Poodle default partition size Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[JFFS2] Avoid warning for empty filesystemsTodd Poynor1-2/+2
Avoid "Eep. No valid nodes for ino #1" message for just-created filesystem. Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND replace yieldThomas Gleixner1-2/+2
Replace yield by msleep. M.Wilcox stared at it and frowned Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] bast-flash partitions fixupBen Dooks1-5/+8
Ensure the whole device is added if there are no partitions found on the device, so that at least the flash can be read/written. Replace some of the constants with their SZ_xxx counterparts Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] Renesas AG-AND device recoveryDavid A. Marlin1-4/+44
Add routine to perform device recovery (deplete) procedure. Clean up some compiler warnings. Signed-off-by: David A. Marlin <dmarlin@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND workaround for AG-AND disturb issue. AG-AND recoveryDavid A. Marlin1-5/+69
Added workaround for Renesas AG-AND chips "disturb" issue for Bad Block Table. Added support for the device recovery command sequence for Renesas AG-AND chips. Signed-off-by: David A. Marlin <dmarlin@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] NAND extended commands, badb block table autorefresh David A. Marlin2-3/+28
Added extended commands for AG-AND device and added option for BBT_AUTO_REFRESH. Signed-off-by: David A. Marlin <dmarlin@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-05-23[MTD] FTL Fix missing pointer assignmentHerbert Valerio Riedel1-2/+3
For the case that mtd partitions are enabled it would cause a 0-pointer dereferencing in mtdpart.c:mtd_erase_callback() Signed-off-by: Herbert Valerio Riedel <hvr@inso.tuwien.ac.at> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>