summaryrefslogtreecommitdiff
path: root/drivers/mtd/parsers/bcm47xxpart.c
AgeCommit message (Collapse)AuthorFilesLines
2022-10-18mtd: parsers: bcm47xxpart: Fix halfblock readsLinus Walleij1-2/+2
There is some code in the parser that tries to read 0x8000 bytes into a block to "read in the middle" of the block. Well that only works if the block is also 0x10000 bytes all the time, else we get these parse errors as we reach the end of the flash: spi-nor spi0.0: mx25l1606e (2048 Kbytes) mtd_read error while parsing (offset: 0x200000): -22 mtd_read error while parsing (offset: 0x201000): -22 (...) Fix the code to do what I think was intended. Cc: stable@vger.kernel.org Fixes: f0501e81fbaa ("mtd: bcm47xxpart: alternative MAGIC for board_data partition") Cc: Rafał Miłecki <zajec5@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20221018091129.280026-1-linus.walleij@linaro.org
2022-04-04mtd: parsers: bcm47xxpart: print correct offset on read errorRafał Miłecki1-1/+1
mtd_read() gets called with offset + 0x8000 as argument so use the same value in pr_err(). Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220317114316.29827-1-zajec5@gmail.com
2019-09-16mtd: parsers: Move BCM47xx parserLinus Walleij1-0/+317
This moves the BCM47xx partition parser down into the parser subdirectory. No functional change. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Richard Weinberger <richard@nod.at>