Devicetree
 help / color / mirror / Atom feed
From: Selvamani Rajagopal via B4 Relay <devnull+Selvamani.Rajagopal.onsemi.com@kernel.org>
To: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>,
	 Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,  Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>
Cc: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>,
	 Andrew Lunn <andrew@lunn.ch>,
	netdev@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Conor Dooley <conor.dooley@microchip.com>,
	 devicetree@vger.kernel.org,
	Piergiorgio Beruto <pier.beruto@onsemi.com>,
	 Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
Subject: [PATCH net v4 2/4] net: ethernet: oa_tc6: No return on rx buffer overflow error
Date: Tue, 09 Jun 2026 12:50:25 -0700	[thread overview]
Message-ID: <20260609-level-trigger-v4-2-6f389abdd192@onsemi.com> (raw)
In-Reply-To: <20260609-level-trigger-v4-0-6f389abdd192@onsemi.com>

From: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>

On RX buffer overflow error, the bad data chunks must
be thrown away and code should look for a data chunk with
"start valid" bit set, which would indicate next valid MAC
frame. In this change, oa_tc6_try_spi_transfer is called
again if it returns error code EAGAIN. This helps to
recover from the error gracefully.

Fixes: 2c6ce5354453 ("net: ethernet: oa_tc6: implement mac-phy interrupt")
Signed-off-by: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>

Changes in v4:
   new patch
---
 drivers/net/ethernet/oa_tc6.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/oa_tc6.c b/drivers/net/ethernet/oa_tc6.c
index e2c0843207f2..20c9e98d1d60 100644
--- a/drivers/net/ethernet/oa_tc6.c
+++ b/drivers/net/ethernet/oa_tc6.c
@@ -1111,6 +1111,8 @@ static irqreturn_t oa_tc6_macphy_threaded_irq(int irq, void *data)
 
 	while (tc6->int_flag || (tc6->waiting_tx_skb && tc6->tx_credits)) {
 		ret = oa_tc6_try_spi_transfer(tc6);
+		if (ret == -EAGAIN)
+			continue;
 		if (ret)
 			break;
 	}

-- 
2.43.0



  parent reply	other threads:[~2026-06-09 19:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 19:50 [PATCH net v4 0/4] MAC-PHY interrupt changed to level triggered interrupt Selvamani Rajagopal via B4 Relay
2026-06-09 19:50 ` [PATCH net v4 1/4] net: ethernet: oa_tc6: Interrupt is active low, level triggered Selvamani Rajagopal via B4 Relay
2026-06-10 19:50   ` sashiko-bot
2026-06-09 19:50 ` Selvamani Rajagopal via B4 Relay [this message]
2026-06-10 19:50   ` [PATCH net v4 2/4] net: ethernet: oa_tc6: No return on rx buffer overflow error sashiko-bot
2026-06-09 19:50 ` [PATCH net v4 3/4] net: ethernet: oa_tc6: mdiobus->parent initialized with NULL Selvamani Rajagopal via B4 Relay
2026-06-10 19:50   ` sashiko-bot
2026-06-09 19:50 ` [PATCH net v4 4/4] dt-bindings: net: updated interrupt type to be active low, level triggered Selvamani Rajagopal via B4 Relay
2026-06-10  7:22   ` Krzysztof Kozlowski
2026-06-10 15:09     ` Selvamani Rajagopal

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=20260609-level-trigger-v4-2-6f389abdd192@onsemi.com \
    --to=devnull+selvamani.rajagopal.onsemi.com@kernel.org \
    --cc=Selvamani.Rajagopal@onsemi.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=parthiban.veerasooran@microchip.com \
    --cc=pier.beruto@onsemi.com \
    --cc=robh@kernel.org \
    /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