higmac_recv() returns -ETIMEDOUT when polling its receive busy queue
finds no packet. net_lwip_rx() only treats -EAGAIN as a non-fatal empty
receive, so DHCP can abort on an idle poll now that it checks
net_lwip_poll().
Return -EAGAIN when the queue remains empty. Preserve the existing polling
limit, free-queue refill and received-buffer ownership handling. Leave
transmit timeout handling unchanged.
Fixes: 53a0ca3757fe ("net: lwip: finish DHCP before starting autoload")
Signed-off-by: James Hilliard <[email protected]>
---
drivers/net/higmacv300.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c
index 6b88f6fbf59..a8ec0dd63a6 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -193,7 +193,7 @@ static int higmac_recv(struct udevice *dev, int flags,
uchar **packetp)
} while (--timeout && bqw_pos == bqr_pos);
if (!timeout)
- return -ETIMEDOUT;
+ return -EAGAIN;
if (++bqr_pos >= RX_DESC_NUM)
bqr_pos = 0;
--
2.53.0