]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spinand: Fix max_bad_eraseblocks_per_lun info in memorg
authorFrieder Schrempf <frieder.schrempf@kontron.de>
Thu, 6 Jun 2019 17:07:55 +0000 (17:07 +0000)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 1 Jul 2019 12:50:20 +0000 (14:50 +0200)
commita0b3918e7c53940127f65a3b77c7f7e510c567c2
tree07aea8e1716e55d17ec89b68c647a335d93789f9
parentb3a254280c80355616128668891234ee929c0a5b
mtd: spinand: Fix max_bad_eraseblocks_per_lun info in memorg

The 1Gb Macronix chip can have a maximum of 20 bad blocks, while
the 2Gb version has twice as many blocks and therefore the maximum
number of bad blocks is 40.

The 4Gb GigaDevice GD5F4GQ4xA has twice as many blocks as its 2Gb
counterpart and therefore a maximum of 80 bad blocks.

Fixes: 167605fc545e ("mtd: nand: Add max_bad_eraseblocks_per_lun info to memorg")
Reported-by: Emil Lenngren <emil.lenngren@gmail.com>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/spi/gigadevice.c
drivers/mtd/nand/spi/macronix.c