aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorKumar Sanghvi <kumaras@chelsio.com>2014-03-13 20:50:50 +0530
committerDavid S. Miller <davem@davemloft.net>2014-03-13 14:36:05 -0400
commitca71de6ba7c18a3a1576e04f7ed8d8508ceba4c9 (patch)
treea1559c68612d6f4d031f5fa3894e4760fd82f339 /drivers/net/ethernet
parentcxgb4: Updates for T5 SGE's Egress Congestion Threshold (diff)
downloadlinux-dev-ca71de6ba7c18a3a1576e04f7ed8d8508ceba4c9.tar.xz
linux-dev-ca71de6ba7c18a3a1576e04f7ed8d8508ceba4c9.zip
cxgb4: Calculate len properly for LSO path
Commit 0034b29 ("cxgb4: Don't assume LSO only uses SGL path in t4_eth_xmit()") introduced a regression where-in length was calculated wrongly for LSO path, causing chip hangs. So, correct the calculation of len. Fixes: 0034b29 ("cxgb4: Don't assume LSO only uses SGL path in t4_eth_xmit()") Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/sge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c
index a7c56b3b9fc9..46429f9d0592 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c
@@ -1051,7 +1051,6 @@ out_free: dev_kfree_skb(skb);
end = (u64 *)wr + flits;
len = immediate ? skb->len : 0;
- len += sizeof(*cpl);
ssi = skb_shinfo(skb);
if (ssi->gso_size) {
struct cpl_tx_pkt_lso *lso = (void *)wr;
@@ -1079,6 +1078,7 @@ out_free: dev_kfree_skb(skb);
q->tso++;
q->tx_cso += ssi->gso_segs;
} else {
+ len += sizeof(*cpl);
wr->op_immdlen = htonl(FW_WR_OP(FW_ETH_TX_PKT_WR) |
FW_WR_IMMDLEN(len));
cpl = (void *)(wr + 1);