net: axi_emac: Change return value to -EAGAIN if RX is not ready
Subsystems (2)
PATCH 1/1 net: axi_emac: Change return value to -EAGAIN if RX is not ready
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 <[email protected]>
--- drivers/net/xilinx_axi_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xilinx_axi_emac.c +1 -1
@@ -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" );
Signature · 1 line
2.39.2
Michal Simek
maintainerQuoted 15 lines · Maksim Kiselev
If there is no incoming package than
axiemac_recvwill return -1 which in turn leads to printingeth_rx: recv() returned error -1error message ineth_rxfunction. But missing a package is not an fatal error, so return-EAGAINin that case would be more suitable.Signed-off-by Maksim Kiselev <[email protected]>--- drivers/net/xilinx_axi_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/xilinx_axi_emac.c +0
-0
drivers/net/xilinx_axi_emac.c static int axiemac_recv(struct udevice *dev, int flags, uchar **packetp) · line 754
Quoted 8 lines
drivers/net/xilinx_axi_emac.c +1
-1@@ -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