aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex
diff options
context:
space:
mode:
authorSomnath Kotur <somnath.kotur@emulex.com>2013-05-26 17:08:47 -0400
committerDavid S. Miller <davem@davemloft.net>2013-05-28 01:27:02 -0400
commit48265667a756ab1c2750048caee3da719a86ebb2 (patch)
tree09e9990161b50656a3ac47a2425237c24db50c70 /drivers/net/ethernet/emulex
parenteeb65cedd78ebd375608d71d703e6b0b9296efbd (diff)
be2net: Pad skb to meet min Tx pkt size in lancer
In Lancer, packets that are 32 bytes or less may cause a transmit stall. The work-around is to pad such packets to a 36 byte length. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index d1580823c286..26e222f81433 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -848,6 +848,16 @@ static struct sk_buff *be_xmit_workarounds(struct be_adapter *adapter,
848 unsigned int eth_hdr_len; 848 unsigned int eth_hdr_len;
849 struct iphdr *ip; 849 struct iphdr *ip;
850 850
851 /* Lancer ASIC has a bug wherein packets that are 32 bytes or less
852 * may cause a transmit stall on that port. So the work-around is to
853 * pad such packets to a 36-byte length.
854 */
855 if (unlikely(lancer_chip(adapter) && skb->len <= 32)) {
856 if (skb_padto(skb, 36))
857 goto tx_drop;
858 skb->len = 36;
859 }
860
851 /* For padded packets, BE HW modifies tot_len field in IP header 861 /* For padded packets, BE HW modifies tot_len field in IP header
852 * incorrecly when VLAN tag is inserted by HW. 862 * incorrecly when VLAN tag is inserted by HW.
853 */ 863 */