From: Maksim Kiselev <bigunclemax@gmail.com>
To: u-boot@lists.denx.de
Cc: Maksim Kiselev <bigunclemax@gmail.com>,
Joe Hershberger <joe.hershberger@ni.com>,
Ramon Fried <rfried.dev@gmail.com>,
Michal Simek <michal.simek@amd.com>
Subject: [PATCH] net: axi_emac: Change return value to -EAGAIN if RX is not ready
Date: Wed, 19 Jul 2023 09:53:37 +0300 [thread overview]
Message-ID: <20230719065337.69280-1-bigunclemax@gmail.com> (raw)
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
next reply other threads:[~2023-07-19 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 6:53 Maksim Kiselev [this message]
2023-07-19 13:54 ` [PATCH] net: axi_emac: Change return value to -EAGAIN if RX is not ready Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230719065337.69280-1-bigunclemax@gmail.com \
--to=bigunclemax@gmail.com \
--cc=joe.hershberger@ni.com \
--cc=michal.simek@amd.com \
--cc=rfried.dev@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox