浏览代码

be2net: Fix HW stall issue in Lancer

Lancer HW cannot handle a TSO packet with a single segment.
Disable TSO/GSO for such packets.

Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Suresh Reddy 7 年之前
父节点
当前提交
3df40aad1a
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      drivers/net/ethernet/emulex/benet/be_main.c

+ 4 - 1
drivers/net/ethernet/emulex/benet/be_main.c

@@ -5104,9 +5104,12 @@ static netdev_features_t be_features_check(struct sk_buff *skb,
 			features &= ~NETIF_F_TSO6;
 			features &= ~NETIF_F_TSO6;
 
 
 		/* Lancer cannot handle the packet with MSS less than 256.
 		/* Lancer cannot handle the packet with MSS less than 256.
+		 * Also it can't handle a TSO packet with a single segment
 		 * Disable the GSO support in such cases
 		 * Disable the GSO support in such cases
 		 */
 		 */
-		if (lancer_chip(adapter) && skb_shinfo(skb)->gso_size < 256)
+		if (lancer_chip(adapter) &&
+		    (skb_shinfo(skb)->gso_size < 256 ||
+		     skb_shinfo(skb)->gso_segs == 1))
 			features &= ~NETIF_F_GSO_MASK;
 			features &= ~NETIF_F_GSO_MASK;
 	}
 	}