]> git.baikalelectronics.ru Git - kernel.git/commit
net: qca_spi: Add available buffer space verification
authorStefan Wahren <stefan.wahren@i2se.com>
Thu, 8 Nov 2018 13:38:21 +0000 (14:38 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Nov 2018 03:41:01 +0000 (19:41 -0800)
commit2c5c6e7b30d8ff411ee62a4e60e49268afff30d4
tree80acab764c725b1c4141bfadb838a3ac9cc8934a
parent314a4c35bfd2b5eb326cb4de6ab85166334cd7b7
net: qca_spi: Add available buffer space verification

Interferences on the SPI line could distort the response of
available buffer space. So at least we should check that the
response doesn't exceed the maximum available buffer space.
In error case increase a new error counter and retry it later.
This behavior avoids buffer errors in the QCA7000, which
results in an unnecessary chip reset including packet loss.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/qca_debug.c
drivers/net/ethernet/qualcomm/qca_spi.c
drivers/net/ethernet/qualcomm/qca_spi.h