Skip to content
Commit 3e7e676c authored by Michael Heimpold's avatar Michael Heimpold Committed by David S. Miller
Browse files

net: qca_spi: fix receive buffer size check



When receiving many or larger packets, e.g. when doing a file download,
it was observed that the read buffer size register reports up to 4 bytes
more than the current define allows in the check.
If this is the case, then no data transfer is initiated to receive the
packets (and thus to empty the buffer) which results in a stall of the
interface.

These 4 bytes are a hardware generated frame length which is prepended
to the actual frame, thus we have to respect it during our check.

Fixes: 026b907d ("net: qca_spi: Add available buffer space verification")
Signed-off-by: default avatarMichael Heimpold <michael.heimpold@in-tech.com>
Signed-off-by: default avatarStefan Wahren <wahrenst@gmx.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aee024f6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment