summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@emulex.com>2013-09-27 15:17:04 -0500
committerDavid S. Miller <davem@davemloft.net>2013-09-27 17:11:48 -0400
commitb54881f9949e4eac6ff23c86625467a365085bd6 (patch)
tree75c730fe842807c69fbb81b4312290386ea04c39
parenta97b7c3aadc8681f7efd8398567255616ad464d8 (diff)
downloadlinux-b54881f9949e4eac6ff23c86625467a365085bd6.tar.gz
linux-b54881f9949e4eac6ff23c86625467a365085bd6.tar.bz2
linux-b54881f9949e4eac6ff23c86625467a365085bd6.zip
be2net: Fix to prevent Tx stall on SH-R when packet size < 32
Tx on SH-R can lockup if the packet size is less than 32 bytes. Pad such packets to a safer 36-byte size. Patch uses the Lancer-R workaround - which checks for packet <= 32-bytes Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 100b528b9bd0..31fa13bc9eed 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -855,11 +855,11 @@ static struct sk_buff *be_xmit_workarounds(struct be_adapter *adapter,
unsigned int eth_hdr_len;
struct iphdr *ip;
- /* Lancer ASIC has a bug wherein packets that are 32 bytes or less
+ /* Lancer, SH-R ASICs have a bug wherein Packets that are 32 bytes or less
* may cause a transmit stall on that port. So the work-around is to
- * pad such packets to a 36-byte length.
+ * pad short packets (<= 32 bytes) to a 36-byte length.
*/
- if (unlikely(lancer_chip(adapter) && skb->len <= 32)) {
+ if (unlikely(!BEx_chip(adapter) && skb->len <= 32)) {
if (skb_padto(skb, 36))
goto tx_drop;
skb->len = 36;