mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-06 05:54:25 +00:00
22 lines
534 B
Diff
22 lines
534 B
Diff
|
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||
|
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||
|
@@ -1019,11 +1019,14 @@ static int brcmnand_hamming_ooblayout_fr
|
||
|
if (!section) {
|
||
|
/*
|
||
|
* Small-page NAND use byte 6 for BBI while large-page
|
||
|
- * NAND use byte 0.
|
||
|
+ * NAND use bytes 0 and 1.
|
||
|
*/
|
||
|
- if (cfg->page_size > 512)
|
||
|
- oobregion->offset++;
|
||
|
- oobregion->length--;
|
||
|
+ if (cfg->page_size > 512) {
|
||
|
+ oobregion->offset += 2;
|
||
|
+ oobregion->length -= 2;
|
||
|
+ } else {
|
||
|
+ oobregion->length--;
|
||
|
+ }
|
||
|
}
|
||
|
}
|
||
|
|