diff options
author | Hariprasad Shenai <hariprasad@chelsio.com> | 2015-09-08 13:55:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-09 22:29:26 +0300 |
commit | fd1754fb8afbd9cf4ea279d533414aa6577b7e60 (patch) | |
tree | e0b3894979aca67dd21b67b9cad52ab1870a7f67 /drivers/net/ethernet/chelsio/cxgb4/sge.c | |
parent | d43cefcd68bbc9a67b2c0efe38eb9cf6b5170fe8 (diff) | |
download | linux-fd1754fb8afbd9cf4ea279d533414aa6577b7e60.tar.xz |
cxgb4: Fix tx flit calculation
In commit 0aac3f56d4a63f04 ("cxgb4: Add comment for calculate tx flits
and sge length code") introduced a regression where tx flit calculation
is going wrong, which can lead to data corruption, hang, stall and
write-combining failure. Fixing it.
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/sge.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/sge.c | 2 |
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 78f446c58422..9162746d7729 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c @@ -807,7 +807,7 @@ static inline unsigned int calc_tx_flits(const struct sk_buff *skb) * message or, if we're doing a Large Send Offload, an LSO CPL message * with an embedded TX Packet Write CPL message. */ - flits = sgl_len(skb_shinfo(skb)->nr_frags + 1) + 4; + flits = sgl_len(skb_shinfo(skb)->nr_frags + 1); if (skb_shinfo(skb)->gso_size) flits += (sizeof(struct fw_eth_tx_pkt_wr) + sizeof(struct cpl_tx_pkt_lso_core) + |