AnsweredAssumed Answered

imx6 SPI errors

Question asked by Stas Gil on May 29, 2018
Latest reply on Jun 13, 2018 by Stas Gil

Hi,

 

We are using a custom board with the imx6qdl processor, with our image based on freescale community bsp for yocto krogoth release.

Kernel version: 4.1.15

Yocto branch: krogoth, 2.0ga

 

We are extensively using SPI to communicate with several devices(texas istruments microcontrollers) on the SPI bus. Please find our spi-imx.c driver attached.

 

We are encountering several different errors:

 

    1) Below are the results of attempting SPI transactions of every length from 0 to 200 16-bit words. The following ranges of message lengths are affected, in bytes:

96-126, 160-190, 224-254, 288-318, 352-382 (decimal).

Transactions with lengths falling in these ranges always fail. This is completely consistent and reproducible.

 

spi_master spi1: I/O Error in DMA RX:60

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:62

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:64

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:66

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:68

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:6a

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:6c

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:6e

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:70

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:72

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:74

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:76

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:78

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:7a

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:7c

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:7e

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:a0

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:a2

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:a4

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:a6

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:a8

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:aa

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:ac

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:ae

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:b0

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:b2

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:b4

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:b6

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:b8

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:ba

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:bc

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:be

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:e0

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:e2

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:e4

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:e6

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:e8

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:ea

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:ec

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:ee

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:f0

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:f2

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:f4

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:f6

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:f8

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:fa

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:fc

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:fe

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:120

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:122

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:124

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:126

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:128

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:12a

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:12c

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:12e

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:130

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:132

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:134

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:136

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:138

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:13a

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:13c

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:13e

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:160

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:162

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:164

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:166

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:168

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:16a

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:16c

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:16e

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:170

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:172

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:174

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:176

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:178

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:17a

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:17c

spi_master spi1: failed to transfer one message from queue

spi_master spi1: I/O Error in DMA RX:17e

spi_master spi1: failed to transfer one message from queue

 

   2)  Additionally, there is the very rare intermittent fault, that shows up like this:

May 24 16:15:08 imx6dl-ctems kernel: spi_master spi2: I/O Error in RX tail

May 24 16:15:08 imx6dl-ctems kernel: spi_master spi2: failed to transfer one message from queue

May 24 16:15:11 imx6dl-ctems kernel: spi_master spi2: I/O Error in DMA RX:8c

May 24 16:15:11 imx6dl-ctems kernel: spi_master spi2: failed to transfer one message from queue

The second error here is caused by attempting to retry the transaction.

This intermittent fault shows up very roughly once in 100000 transactions.

 

I have tried the fix from this question : imx6 SPI in DMA mode sometime throws "I/O Error in DMA RX"  but that didn't work

 

According to this question: SPI DMA support in imx6  and documentation, DMA is not supported in SPI by default. So, how come that all the errors come from the DMA handling code ?

 

I have not yet tried the patchset from https://community.nxp.com/message/888805?commentID=888805#comment-888805  , but i would like to ask, if there is anywhere i can find an up to date spi-imx.c driver that is compatible with kernel 4.1.15 ?

Attachments

Outcomes