- 20 9月, 2009 1 次提交
-
-
由 Sneha Narnakaje 提交于
This patch adds a new "page" parameter to all NAND read_page/read_page_raw APIs. The read_page API for the new mode ECC_HW_OOB_FIRST requires the page information to send the READOOB command and read the OOB area before the data area. Reviewed-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NSneha Narnakaje <nsnehaprabha@ti.com> Signed-off-by: NSandeep Paulraj <s-paulraj@ti.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 04 9月, 2009 3 次提交
-
-
由 Singh, Vimal 提交于
This patch allows core driver to choose ECC block size in sw ecc case. Signed-off-by: NVimal Singh <vimalsingh@ti.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 vimal singh 提交于
Correcting debug prints by removing function names from print messages and using '__func__' macro instead. Function names were wrong in few places. Signed-off-by: NVimal Singh <vimalsingh@ti.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 vimal singh 提交于
Singed-off-by: NVimal Singh <vimalsingh@ti.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 06 6月, 2009 1 次提交
-
-
由 David Brownell 提交于
Resolve issue noted by Sneha: when computing oobavail from the list of free areas in the OOB, don't assume there will always be an unused slot at the end. With ECC_HW_SYNDROME and 4KiB page chips, it's fairly likely there *won't* be one. Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net> Cc: "Narnakaje, Snehaprabha" <nsnehaprabha@ti.com>" Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 06 4月, 2009 1 次提交
-
-
由 Thomas Gleixner 提交于
Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NSebastian Siewior <bigeasy@linutronix.de> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 31 3月, 2009 1 次提交
-
-
由 Rusty Russell 提交于
Impact: Replace and remove risky (non-EXPORTed) API module_text_address() returns a pointer to the module, which given locking improvements in module.c, is useless except to test for NULL: 1) If the module can't go away, use __module_text_address. 2) Otherwise, just use is_module_text_address(). Cc: linux-mtd@lists.infradead.org Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 20 3月, 2009 2 次提交
-
-
由 David Brownell 提交于
Fix incorrect debug messages (*write* not read); someone committed some cut'n'paste bugs. There might be more, I only noticed these since I was looking for nand_read usage and landed in some very wrong functions. IMO all MTD debugging message framework is goofed, anyway. It uses "DEBUG" in a way that's incompatible with usage most everywhere else in the kernel, and which prevents normal pr_dbg() and dev_dbg() calls from working right. [True. It predates those by a long way, and should probably be updated to use them. dwmw2] Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 David Brownell 提交于
The syndrome based page read/write routines store ECC, and possibly other "OOB" data, right after each chunk of ECC'd data. With ECC chunk size of 512 bytes and a large page (2KiB) NAND, the layout is: data-0 OOB-0 data-1 OOB-1 data-2 OOB-2 data-3 OOB-3 OOB-leftover Where OOBx is (prepad, ECC, postpad). However, the current "raw" routines use a traditional layout -- data OOB, disregarding the prepad and postpad values -- so when they're used with that type of ECC hardware, those calls mix up the data and OOB. Which means, in particular, that bad block tables won't be found on startup, with data corruption and related chaos ensuing. The current syndrome-based drivers in mainline all seem to use one chunk per page; presumably they haven't noticed such bugs. Fix this, by adding read/write page_raw_syndrome() routines as siblings of the existing non-raw routines; "raw" just means to bypass the ECC computations, not change data and OOB layout. Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 11 12月, 2008 1 次提交
-
-
由 Randy Dunlap 提交于
Delete extra kernel-doc notation for struct fields and function parameters that don't exist: Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'wq' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'datbuf' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'oobbuf' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'oobdirty' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'data_poi' description in 'nand_chip' Warning(drivers/mtd/nand/nand_base.c:2527): Excess function parameter 'maxchips' description in 'nand_scan_tail' Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 10 12月, 2008 1 次提交
-
-
由 Adrian Hunter 提交于
MTD internal API presently uses 32-bit values to represent device size. This patch updates them to 64-bits but leaves the external API unchanged. Extending the external API is a separate issue for several reasons. First, no one needs it at the moment. Secondly, whether the implementation is done with IOCTLs, sysfs or both is still debated. Thirdly external API changes require the internal API to be accepted first. Note that although the MTD API will be able to support 64-bit device sizes, existing drivers do not and are not required to do so, although NAND base has been updated. In general, changing from 32-bit to 64-bit values cause little or no changes to the majority of the code with the following exceptions: - printk message formats - division and modulus of 64-bit values - NAND base support - 32-bit local variables used by mtdpart and mtdconcat - naughtily assuming one structure maps to another in MEMERASE ioctl Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 16 9月, 2008 1 次提交
-
-
由 Karl Beldan 提交于
Some chips require a RESET after power-up (e.g. Micron MT29FxGxxxxx). The first command sent is NAND_CMD_READID. Issue a NAND_CMD_RESET in nand_scan_ident before reading the device id. Tested with an MT29F4G08AAC. Signed-off-by: NKarl Beldan <karl.beldan@gmail.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 21 8月, 2008 1 次提交
-
-
由 Alexey Korolev 提交于
[Reported by Randy Dunlap] Signed-off-by: NAlexey Korolev <akorolev@infradead.org> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 12 8月, 2008 1 次提交
-
-
由 Adrian Hunter 提交于
Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 25 7月, 2008 1 次提交
-
-
由 Alexey Korolev 提交于
This patch enables NAND subpage read functionality. If upper layer drivers are requesting to read non page aligned data NAND subpage-read functionality reads the only whose ECC regions which include requested data when original code reads whole page. This significantly improves performance in many cases. Here are some digits : UBI volume mount time No subpage reads: 5.75 seconds Subpage read patch: 2.42 seconds Open/stat time for files on JFFS2 volume: No subpage read 0m 5.36s Subpage read 0m 2.88s Signed-off-by Alexey Korolev <akorolev@infradead.org> Acked-by: NArtem Bityutskiy <dedekind@infradead.org> Acked-by: NJörn Engel <joern@logfs.org> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 23 4月, 2008 1 次提交
-
-
由 Ben Dooks 提交于
With modern systems using bus-hold instead of bus pull-up, it can often lead to erroneous reporting of NAND devices where there are none. Do a double probe to ensure that the result we got the first time is repeatable, and if it is not then return that there is no chip there. Signed-off-by: NBen Dooks <ben-linux@fluff.org> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 03 2月, 2008 2 次提交
-
-
由 Joe Perches 提交于
Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NAdrian Bunk <bunk@kernel.org>
-
由 Scott Wood 提交于
Signed-off-by: NScott Wood <scottwood@freescale.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 08 1月, 2008 1 次提交
-
-
由 Scott Wood 提交于
Some hardware, such as the enhanced local bus controller used on some mpc83xx chips, does ecc transparently when reading and writing data, rather than providing a generic calculate/correct mechanism that can be exported to the nand subsystem. The subsystem should not BUG() when calculate, correct, or hwctl are missing, if the methods that call them have been overridden. Signed-off-by: NScott Wood <scottwood@freescale.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 21 10月, 2007 1 次提交
-
-
由 Matt Reimer 提交于
Treat any negative return value from a NAND driver's correct() function as a failure, rather than just -1. Signed-off-by: NMatt Reimer <mreimer@vpop.net> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 07 10月, 2007 1 次提交
-
-
由 David Woodhouse 提交于
When the erase callback performs some other action on the flash, it's highly likely to deadlock unless we actually release the chip lock before calling it. Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 03 8月, 2007 2 次提交
-
-
由 Ben Dooks 提交于
The nand_base.c driver implicitly casts the uint32_t eccpos array to 'int *', which is not only not guaranteed to be the same sign as the source, but is not guaranteed to be the same size. Fix by changing nand_base.c to use uint32_t referencing the eccpos fields. Signed-off-by: NBen Dooks <ben-linux@fluff.org> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
由 Artem Bityutskiy 提交于
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: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 01 8月, 2007 1 次提交
-
-
由 maximilian attems 提交于
replace with working link from nand Kconfig help text fixes bugzilla 7815 Signed-off-by: Nmaximilian attems <max@stro.at> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 23 7月, 2007 1 次提交
-
-
由 Artem Bityutskiy 提交于
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: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 29 6月, 2007 1 次提交
-
-
由 Ben Dooks 提交于
The nand_base.c driver implicitly casts the uint32_t eccpos array to 'int *', which is not only not guaranteed to be the same sign as the source, but is not guaranteed to be the same size. Fix by changing nand_base.c to use uint32_t referencing the eccpos fields. Signed-off-by: NBen Dooks <ben-linux@fluff.org> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 03 5月, 2007 1 次提交
-
-
由 Thomas Knobloch 提交于
Further to the previous patch fixing the calculation of page number, both branches are using the same result. Clean up the function accordingly, calculating it (and also masking with pagemask) only in one place. Signed-off-by: NThomas Knobloch <knobloch@siemens.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 27 4月, 2007 1 次提交
-
-
由 Knobloch, Thomas 提交于
In case that there is no memory based bad block table available the function nand_block_checkbad() in drivers/mtd/nand/nand_base.c will call nand_block_bad() directly. When parameter 'getchip' is set to zero, nand_block_bad() will not right shift the offset to calculate the correct page number. Signed-off-by: NThomas Knobloch <knobloch@siemens.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 18 4月, 2007 2 次提交
-
-
由 Andre Renaud 提交于
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: NAndre Renaud <andre@bluewatersys.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 08 3月, 2007 1 次提交
-
-
由 Vitaly Wool 提交于
During the MTD rework the oobavail parameter of mtd_info structure has become private. This is not quite correct in terms of integrity and logic. If we have means to write to OOB area, then we'd like to know upfront how many bytes out of OOB are spare per page to be able to adapt to specific cases. The patch inlined adds the public oobavail parameter. Signed-off-by: NVitaly Wool <vwool@ru.mvista.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 09 2月, 2007 2 次提交
-
-
由 Artem Bityutskiy 提交于
Remove unused and broken mtd->ecctype and mtd->eccsize fields from struct mtd_info. Do not remove them from userspace API data structures (don't want to breake userspace) but mark them as obsolete by a comment. Any userspace program which uses them should be half-broken anyway, so this is more about saving data structure size. Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
由 Adrian Hunter 提交于
Add checks to ensure that out-of-band reads and writes are not attempted with an invalid offset or length. Specifically, the offset must be less than the size of oob for a page and the length must not go beyond the size of the device. Additionally the checks must adjust for auto-placement (MTD_OOB_AUTO) of oob data. Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 29 11月, 2006 2 次提交
-
-
由 Thomas Gleixner 提交于
Many SLC NANDs support up to 4 writes at one NAND page. Add support of this feature. Signed-off-by: NArtem Bityutskiy <dedekind@infradead.org>
-
由 Vitaly Wool 提交于
As was discussed between Ricard Wanderlöf, David Woodhouse, Artem Bityutskiy and me, the current API for reading/writing OOB is confusing. The thing that introduces confusion is the need to specify ops.len together with ops.ooblen for reads/writes that concern only OOB not data area. So, ops.len is overloaded: when ops.datbuf != NULL it serves to specify the length of the data read, and when ops.datbuf == NULL, it serves to specify the full OOB read length. The patch inlined below is the slightly updated version of the previous patch serving the same purpose, but with the new Artem's comments taken into account. Artem, BTW, thanks a lot for your valuable input! Signed-off-by: NVitaly Wool <vwool@ru.mvista.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 28 10月, 2006 1 次提交
-
-
由 Jesper Juhl 提交于
Add description of 'raw' in comments for drivers/mtd/nand/nand_base.c::nand_write_page_syndrome() so 'make xmldocs' will not spew a warning at us. Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com> Acked-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 26 10月, 2006 1 次提交
-
-
由 Ricard Wanderlöf 提交于
When a flash-based BBT is not used, nand_default_mark_blockbad() is supposed to mark the block bad in the oob. However, it sets the wrong length variable so that no bad block marker is in fact written. This patch attempts to rectify that. (As note, it seems to be that logically, it shouldn't be necessary to set both length variables, as one appears to be for the main buffer, and one for the oob buffer, but this is how it is done in several places, including the code for the mtd character device MEMWRITEOOB and MEMREADOOB ioctls. I'm not sure if this is a temporary solution during some rework of the mtd infrastructure, or whether there is a deeper thought here.) Signed-off-by: NRicard Wanderlöf <ricardw@axis.com> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 22 10月, 2006 2 次提交
-
-
由 David Woodhouse 提交于
Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
由 David Woodhouse 提交于
Ditch the separate oobrbuf and oobwbuf fields from the chip buffers, and use only a single buffer immediately after the data. This accommodates NAND controllers such as the OLPC CAFÉ chip, which can't do scatter/gather DMA so needs the OOB buffer to be contiguous with the data, for both read and write. Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 21 10月, 2006 1 次提交
-
-
由 Artem Bityutskiy 提交于
Signed-off-by: NArtem Bityutskiy <dedekind@infradead.org> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-