Skip to content

Commit

Permalink
net: macb: Fix race condition in driver when Rx frame is dropped
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Punnaiah Choudary Kalluri authored and David S. Miller committed Apr 29, 2015
1 parent b56fc3c commit d4c216c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/cadence/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit d4c216c

Please sign in to comment.