]> 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)
commit95bf3c0b22b0f3cdac9fb4e648821e6d12f6f361
tree07aea8e1716e55d17ec89b68c647a335d93789f9
parentb49008dbb1e18d331ada5c5284600ddd65b74262
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: a02c49a0a465 ("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