diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-18 19:18:01 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-18 19:18:01 -0500 |
| commit | ace52288edf0cb5e7a52b681f057f86224c49c27 (patch) | |
| tree | 4c3979203734a48fe689eb022251b3bc1a9934a7 | |
| parent | cb81fc6a3cf694345f29858624e5d9f3509d30d4 (diff) | |
| parent | d82c3682168431d29ba1741d0cd5ef45c68bf8e0 (diff) | |
Merge tag 'for-linus-20171218' of git://git.infradead.org/linux-mtd
Pull MTD fixes from Richard Weinberger:
"This contains the following regression fixes:
- fix bitflip handling in brcmnand and gpmi nand drivers
- revert a bad device tree binding for spi-nor
- fix a copy&paste error in gpio-nand driver
- fix a too strict length check in mtd core"
* tag 'for-linus-20171218' of git://git.infradead.org/linux-mtd:
mtd: Fix mtd_check_oob_ops()
mtd: nand: gpio: Fix ALE gpio configuration
mtd: nand: brcmnand: Zero bitflip is not an error
mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM
Revert "dt-bindings: mtd: add sst25wf040b and en25s64 to sip-nor list"
| -rw-r--r-- | Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | 2 | ||||
| -rw-r--r-- | drivers/mtd/mtdcore.c | 2 | ||||
| -rw-r--r-- | drivers/mtd/nand/brcmnand/brcmnand.c | 2 | ||||
| -rw-r--r-- | drivers/mtd/nand/gpio.c | 6 | ||||
| -rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 6 |
5 files changed, 8 insertions, 10 deletions
diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt index 376fa2f50e6b..956bb046e599 100644 --- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt +++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | |||
| @@ -13,7 +13,6 @@ Required properties: | |||
| 13 | at25df321a | 13 | at25df321a |
| 14 | at25df641 | 14 | at25df641 |
| 15 | at26df081a | 15 | at26df081a |
| 16 | en25s64 | ||
| 17 | mr25h128 | 16 | mr25h128 |
| 18 | mr25h256 | 17 | mr25h256 |
| 19 | mr25h10 | 18 | mr25h10 |
| @@ -33,7 +32,6 @@ Required properties: | |||
| 33 | s25fl008k | 32 | s25fl008k |
| 34 | s25fl064k | 33 | s25fl064k |
| 35 | sst25vf040b | 34 | sst25vf040b |
| 36 | sst25wf040b | ||
| 37 | m25p40 | 35 | m25p40 |
| 38 | m25p80 | 36 | m25p80 |
| 39 | m25p16 | 37 | m25p16 |
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index f80e911b8843..73b605577447 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c | |||
| @@ -1114,7 +1114,7 @@ static int mtd_check_oob_ops(struct mtd_info *mtd, loff_t offs, | |||
| 1114 | if (!ops->oobbuf) | 1114 | if (!ops->oobbuf) |
| 1115 | ops->ooblen = 0; | 1115 | ops->ooblen = 0; |
| 1116 | 1116 | ||
| 1117 | if (offs < 0 || offs + ops->len >= mtd->size) | 1117 | if (offs < 0 || offs + ops->len > mtd->size) |
| 1118 | return -EINVAL; | 1118 | return -EINVAL; |
| 1119 | 1119 | ||
| 1120 | if (ops->ooblen) { | 1120 | if (ops->ooblen) { |
diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c index e0eb51d8c012..dd56a671ea42 100644 --- a/drivers/mtd/nand/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/brcmnand/brcmnand.c | |||
| @@ -1763,7 +1763,7 @@ try_dmaread: | |||
| 1763 | err = brcmstb_nand_verify_erased_page(mtd, chip, buf, | 1763 | err = brcmstb_nand_verify_erased_page(mtd, chip, buf, |
| 1764 | addr); | 1764 | addr); |
| 1765 | /* erased page bitflips corrected */ | 1765 | /* erased page bitflips corrected */ |
| 1766 | if (err > 0) | 1766 | if (err >= 0) |
| 1767 | return err; | 1767 | return err; |
| 1768 | } | 1768 | } |
| 1769 | 1769 | ||
diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c index 484f7fbc3f7d..a8bde6665c24 100644 --- a/drivers/mtd/nand/gpio.c +++ b/drivers/mtd/nand/gpio.c | |||
| @@ -253,9 +253,9 @@ static int gpio_nand_probe(struct platform_device *pdev) | |||
| 253 | goto out_ce; | 253 | goto out_ce; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | gpiomtd->nwp = devm_gpiod_get(dev, "ale", GPIOD_OUT_LOW); | 256 | gpiomtd->ale = devm_gpiod_get(dev, "ale", GPIOD_OUT_LOW); |
| 257 | if (IS_ERR(gpiomtd->nwp)) { | 257 | if (IS_ERR(gpiomtd->ale)) { |
| 258 | ret = PTR_ERR(gpiomtd->nwp); | 258 | ret = PTR_ERR(gpiomtd->ale); |
| 259 | goto out_ce; | 259 | goto out_ce; |
| 260 | } | 260 | } |
| 261 | 261 | ||
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 50f8d4a1b983..d4d824ef64e9 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c | |||
| @@ -1067,9 +1067,6 @@ static int gpmi_ecc_read_page(struct mtd_info *mtd, struct nand_chip *chip, | |||
| 1067 | return ret; | 1067 | return ret; |
| 1068 | } | 1068 | } |
| 1069 | 1069 | ||
| 1070 | /* handle the block mark swapping */ | ||
| 1071 | block_mark_swapping(this, payload_virt, auxiliary_virt); | ||
| 1072 | |||
| 1073 | /* Loop over status bytes, accumulating ECC status. */ | 1070 | /* Loop over status bytes, accumulating ECC status. */ |
| 1074 | status = auxiliary_virt + nfc_geo->auxiliary_status_offset; | 1071 | status = auxiliary_virt + nfc_geo->auxiliary_status_offset; |
| 1075 | 1072 | ||
| @@ -1158,6 +1155,9 @@ static int gpmi_ecc_read_page(struct mtd_info *mtd, struct nand_chip *chip, | |||
| 1158 | max_bitflips = max_t(unsigned int, max_bitflips, *status); | 1155 | max_bitflips = max_t(unsigned int, max_bitflips, *status); |
| 1159 | } | 1156 | } |
| 1160 | 1157 | ||
| 1158 | /* handle the block mark swapping */ | ||
| 1159 | block_mark_swapping(this, buf, auxiliary_virt); | ||
| 1160 | |||
| 1161 | if (oob_required) { | 1161 | if (oob_required) { |
| 1162 | /* | 1162 | /* |
| 1163 | * It's time to deliver the OOB bytes. See gpmi_ecc_read_oob() | 1163 | * It's time to deliver the OOB bytes. See gpmi_ecc_read_oob() |
