Hi list, I am currently working on a fix for a regression that causes reads on 32 MB flash to fail on ar71xx Linux 4.9 and need some help with this.
The bug is already reported in all detail at [1], but in shorts, it's: * on the way to Linux 4.9, a mmap'ed read request was added to m25p80.c that gets used when a spi_flash_read_supported() callback returns true ([2]). * the respective callback was wired to a function with [3], but this only took care of multi-chip setups. * I suspect that this [4] check in ath79-spi.c causes mtd read to fail on chips > 16GB. I tried removing it, read _seems_ to work at first, but then the device reproducibly crashes. So it seems this is not a proper solution. I reckon the right way to handle this is to add another test in ath79_spi_flash_read_supported() [5]. My question: how to access the underlying flash device's size info from a struct spi_device* ? Thanks a lot, Christian [1] https://bugs.openwrt.org/index.php?do=details&task_id=1376 [2] https://github.com/torvalds/linux/commit/08922f644878c9163ada8df3ef9def89be1d5e90 [3] https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=e0d58157d8e2ec3da0a1fe62a65aa756c5514871 [4] https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ar71xx/patches-4.9/461-spi-ath79-add-fast-flash-read.patch;h=5c3583f758bb51cefacb31dce9f6a4c73f3a6384;hb=HEAD#l30 [5] https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ar71xx/patches-4.9/461-spi-ath79-add-fast-flash-read.patch;h=5c3583f758bb51cefacb31dce9f6a4c73f3a6384;hb=HEAD#l17
pgp8mMwxhANaG.pgp
Description: Digitale Signatur von OpenPGP
_______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev