aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPunnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com>2015-04-28 23:04:46 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-29 15:24:46 -0400
commitd4c216c54197d741ed8b7ca54f13645dfb3eacde (patch)
treed2671fa5854cde79770e8ad37900b6b05622852d
parentb56fc3c536541c8081cd5f1f1d101a16c002a365 (diff)
net: macb: Fix race condition in driver when Rx frame is dropped
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/cadence/macb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 665c29098e3c..4104d49f005d 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)
707 707
708 /* properly align Ethernet header */ 708 /* properly align Ethernet header */
709 skb_reserve(skb, NET_IP_ALIGN); 709 skb_reserve(skb, NET_IP_ALIGN);
710 } else {
711 bp->rx_ring[entry].addr &= ~MACB_BIT(RX_USED);
712 bp->rx_ring[entry].ctrl = 0;
710 } 713 }
711 } 714 }
712 715