]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: axi_emac: Change return value to -EAGAIN if RX is not ready
authorMaksim Kiselev <bigunclemax@gmail.com>
Wed, 19 Jul 2023 06:53:37 +0000 (09:53 +0300)
committerMichal Simek <michal.simek@amd.com>
Fri, 21 Jul 2023 07:00:39 +0000 (09:00 +0200)
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>
Link: https://lore.kernel.org/r/20230719065337.69280-1-bigunclemax@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/net/xilinx_axi_emac.c

index 3e9919993d06a891ea297e705731b7ad4020c9b7..39cb3cc260bcf2a44f8c89dff474bcef5a8a3c04 100644 (file)
@@ -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");