]> git.baikalelectronics.ru Git - uboot.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)
commitd66ce5f5d707d7e3fc70678bd4c179818c0febcd
treed1e76b8d1c294f22fa86a44959a9a02c46a1691b
parent1d10fccbda3b5b72e92783e7474c223f13225257
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