* [PATCH] net: axi_emac: Change return value to -EAGAIN if RX is not ready
@ 2023-07-19 6:53 Maksim Kiselev
2023-07-19 13:54 ` Michal Simek
0 siblings, 1 reply; 2+ messages in thread
From: Maksim Kiselev @ 2023-07-19 6:53 UTC (permalink / raw)
To: u-boot; +Cc: Maksim Kiselev, Joe Hershberger, Ramon Fried, Michal Simek
If there is no incoming package than axiemac_recv will return -1 which
in turn leads to printing `eth_rx: recv() returned error -1` error
message in eth_rx function. But missing a package is not an fatal error,
so return -EAGAIN in that case would be more suitable.
Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
---
drivers/net/xilinx_axi_emac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 3e9919993d..39cb3cc260 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -748,7 +748,7 @@ static int axiemac_recv(struct udevice *dev, int flags, uchar **packetp)
/* Wait for an incoming packet */
if (!isrxready(priv))
- return -1;
+ return -EAGAIN;
debug("axiemac: RX data ready\n");
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: axi_emac: Change return value to -EAGAIN if RX is not ready
2023-07-19 6:53 [PATCH] net: axi_emac: Change return value to -EAGAIN if RX is not ready Maksim Kiselev
@ 2023-07-19 13:54 ` Michal Simek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2023-07-19 13:54 UTC (permalink / raw)
To: Maksim Kiselev, u-boot; +Cc: Joe Hershberger, Ramon Fried
On 7/19/23 08:53, Maksim Kiselev wrote:
> If there is no incoming package than axiemac_recv will return -1 which
> in turn leads to printing `eth_rx: recv() returned error -1` error
> message in eth_rx function. But missing a package is not an fatal error,
> so return -EAGAIN in that case would be more suitable.
>
> Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
> ---
> drivers/net/xilinx_axi_emac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
> index 3e9919993d..39cb3cc260 100644
> --- a/drivers/net/xilinx_axi_emac.c
> +++ b/drivers/net/xilinx_axi_emac.c
> @@ -748,7 +748,7 @@ static int axiemac_recv(struct udevice *dev, int flags, uchar **packetp)
>
> /* Wait for an incoming packet */
> if (!isrxready(priv))
> - return -1;
> + return -EAGAIN;
>
> debug("axiemac: RX data ready\n");
>
Make sense. Applied.
M
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-19 13:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-19 6:53 [PATCH] net: axi_emac: Change return value to -EAGAIN if RX is not ready Maksim Kiselev
2023-07-19 13:54 ` Michal Simek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox