netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: macb: Fix race condition in driver when Rx frame is dropped
@ 2015-04-29  3:04 Punnaiah Choudary Kalluri
  2015-04-29 19:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Punnaiah Choudary Kalluri @ 2015-04-29  3:04 UTC (permalink / raw)
  To: nicolas.ferre, davem
  Cc: netdev, linux-kernel, michals, harinik, kpc528,
	kalluripunnaiahchoudary, Punnaiah Choudary Kalluri,
	Punnaiah Choudary Kalluri

From: Punnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com>

Under heavy Rx load, observed that the Hw is updating the USED bit
and it is not updating the received frame status to the BD control
field. This could be lack of resources for processing the BDs at high
data rates. Driver drops the frame associated with this BD but not
clearing the USED bit. So, this is causing hang condition as Hw
expects USED bit to be cleared for this BD.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
---
 drivers/net/ethernet/cadence/macb.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 9f53872..d79b0b1 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -707,6 +707,9 @@ static void gem_rx_refill(struct macb *bp)
 
 			/* properly align Ethernet header */
 			skb_reserve(skb, NET_IP_ALIGN);
+		} else {
+			bp->rx_ring[entry].addr &= ~MACB_BIT(RX_USED);
+			bp->rx_ring[entry].ctrl = 0;
 		}
 	}
 
-- 
1.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: macb: Fix race condition in driver when Rx frame is dropped
  2015-04-29  3:04 [PATCH] net: macb: Fix race condition in driver when Rx frame is dropped Punnaiah Choudary Kalluri
@ 2015-04-29 19:25 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-04-29 19:25 UTC (permalink / raw)
  To: punnaiah.choudary.kalluri
  Cc: nicolas.ferre, netdev, linux-kernel, michals, harinik, kpc528,
	kalluripunnaiahchoudary, punnaia

From: Punnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com>
Date: Wed, 29 Apr 2015 08:34:46 +0530

> From: Punnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com>
> 
> Under heavy Rx load, observed that the Hw is updating the USED bit
> and it is not updating the received frame status to the BD control
> field. This could be lack of resources for processing the BDs at high
> data rates. Driver drops the frame associated with this BD but not
> clearing the USED bit. So, this is causing hang condition as Hw
> expects USED bit to be cleared for this BD.
> 
> Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-29 19:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-29  3:04 [PATCH] net: macb: Fix race condition in driver when Rx frame is dropped Punnaiah Choudary Kalluri
2015-04-29 19:25 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).