]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: sh_eth: Fix RX error handling
authorValentine Barshak <valentine.barshak@cogentembedded.com>
Tue, 30 May 2023 22:51:31 +0000 (00:51 +0200)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Sat, 10 Jun 2023 11:34:05 +0000 (13:34 +0200)
commit41a0cfd0c5123cffb3a945223b6ef153df61f352
treed1e76b8d1c294f22fa86a44959a9a02c46a1691b
parentd49ba9c8d70c30d6f009e069cf43b4817be3546d
net: sh_eth: Fix RX error handling

In case RX error occurs, and the RD_RFE bit is set, the descriptor
is never returned back to the queue. Make sh_eth_recv_start return
zero length in this case so that the descriptor can be released
and pushed back to the list. Also return the more appropriate
-EAGAIN instead of -EINVAL if the descriptor is not ready yet.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/sh_eth.c