[OpenWrt-Devel] Broken SPI transfers on TD-W8970 (latest trunk)
Martin Blumenstingl
martin.blumenstingl at googlemail.com
Thu Oct 15 18:06:22 EDT 2015
Hi John,
On Thu, Oct 15, 2015 at 7:59 AM, John Crispin <blogic at openwrt.org> wrote:
> bummer. i had hoped that my patch fixed the issue.
>
> did you try the patch graham posted ?
I split the patch into two and tried:
1) flushing in ltq_spi_wait_ready
2) reducing rxreq_max in ltq_spi_rxreq_set
3) both of the changes from above together
The results:
1) Most of the time the kernel does not boot at all, yielding the
following errors (sometimes it does go further though, but that seems
random):
[ 2.183972] spi-xway 1e100800.spi: error c4002203
[ 2.187270] spi_master spi32766: failed to transfer one message from queue
[ 2.194145] blk_update_request: I/O error, dev mtdblock2, sector 1490
[ 2.200713] SQUASHFS error: squashfs_read_data failed to read block 0xb877e
[ 2.207549] SQUASHFS error: Unable to read fragment cache entry [b877e]
[ 2.214141] SQUASHFS error: Unable to read page, block b877e, size 14eb8
[ 2.220894] SQUASHFS error: Unable to read fragment cache entry [b877e]
...
Error loading shared library libgcc_s.so.1: I/O error (needed by /etc/preinit)
2) device does not boot in this case, it hangs with:
[ 2.044041] spi-xway 1e100800.spi: SPI wait ready timed out stat: c4002003
[ 2.049657] m25p80 spi32766.3: wait failed
3) Still yields read errors (sometimes all files in /etc/config are
empty in that case):
[ 11.528674] spi-xway 1e100800.spi: error a40b2203
[ 11.532011] spi_master spi32766: failed to transfer one message from queue
[ 11.538845] jffs2: error: (304) check_node_data: short read at
0x009ad0: 0 instead of 202.
[ 11.547097] jffs2: error: (304) check_tn_node: check_node_data()
returned error: -5.
[ 11.696937] procd: - ubus -
[ 12.124641] spi-xway 1e100800.spi: error 940c2203
[ 12.127979] spi_master spi32766: failed to transfer one message from queue
[ 12.134805] jffs2: error: (304) check_node_data: short read at
0x0068a8: 0 instead of 89.
[ 12.142981] jffs2: error: (304) check_tn_node: check_node_data()
returned error: -5.
[ 12.150828] jffs2: warning: (304) jffs2_do_read_inode_internal:
Truncating ino #39 to 103 bytes failed because it only had 0 bytes to
start with!
[ 12.264631] spi-xway 1e100800.spi: error 94052203
[ 12.267911] spi_master spi32766: failed to transfer one message from queue
[ 12.274798] jffs2: error: (304) check_node_data: short read at
0x006dc8: 0 instead of 89.
[ 12.282971] jffs2: error: (304) check_tn_node: check_node_data()
returned error: -5.
[ 12.290844] jffs2: warning: (304) jffs2_do_read_inode_internal:
Truncating ino #42 to 92 bytes failed because it only had 0 bytes to
start with!
[ 12.508613] spi-xway 1e100800.spi: error 94052203
So it seems that flushing in ltq_spi_wait_ready helps a bit, but then
we get LTQ_SPI_STAT_RE ("receive errors") from the HW.
Let me know if you need more details.
Regards,
Martin
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list