aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorHariprasad Shenai <hariprasad@chelsio.com>2014-10-08 20:18:45 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-09 18:53:51 -0400
commit7207c0d1540b679993d1f0bb9c1ff8e068958c75 (patch)
tree356e6101f4b8666621bc8e6f61592a8b7b2b1595 /drivers/net
parentea97caeee2ba60d258292ffca0b2c4778eb6bc21 (diff)
cxgb4/cxgb4vf: Updated the LSO transfer length in CPL_TX_PKT_LSO for T5
Update the lso length for T5 adapter and fix PIDX_T5 macro Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/sge.c5
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4_msg.h1
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4_regs.h5
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/sge.c5
4 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c
index fab4c84a1da4..5e1b314e11af 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c
@@ -1123,7 +1123,10 @@ out_free: dev_kfree_skb_any(skb);
1123 lso->c.ipid_ofst = htons(0); 1123 lso->c.ipid_ofst = htons(0);
1124 lso->c.mss = htons(ssi->gso_size); 1124 lso->c.mss = htons(ssi->gso_size);
1125 lso->c.seqno_offset = htonl(0); 1125 lso->c.seqno_offset = htonl(0);
1126 lso->c.len = htonl(skb->len); 1126 if (is_t4(adap->params.chip))
1127 lso->c.len = htonl(skb->len);
1128 else
1129 lso->c.len = htonl(LSO_T5_XFER_SIZE(skb->len));
1127 cpl = (void *)(lso + 1); 1130 cpl = (void *)(lso + 1);
1128 cntrl = TXPKT_CSUM_TYPE(v6 ? TX_CSUM_TCPIP6 : TX_CSUM_TCPIP) | 1131 cntrl = TXPKT_CSUM_TYPE(v6 ? TX_CSUM_TCPIP6 : TX_CSUM_TCPIP) |
1129 TXPKT_IPHDR_LEN(l3hdr_len) | 1132 TXPKT_IPHDR_LEN(l3hdr_len) |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h b/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
index 52e08103f221..5f4db2398c71 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
@@ -527,6 +527,7 @@ struct cpl_tx_pkt_lso_core {
527#define LSO_LAST_SLICE (1 << 22) 527#define LSO_LAST_SLICE (1 << 22)
528#define LSO_FIRST_SLICE (1 << 23) 528#define LSO_FIRST_SLICE (1 << 23)
529#define LSO_OPCODE(x) ((x) << 24) 529#define LSO_OPCODE(x) ((x) << 24)
530#define LSO_T5_XFER_SIZE(x) ((x) << 0)
530 __be16 ipid_ofst; 531 __be16 ipid_ofst;
531 __be16 mss; 532 __be16 mss;
532 __be32 seqno_offset; 533 __be32 seqno_offset;
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h b/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h
index eee272883027..a1024db5dc13 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h
@@ -72,9 +72,8 @@
72#define PIDX_MASK 0x00003fffU 72#define PIDX_MASK 0x00003fffU
73#define PIDX_SHIFT 0 73#define PIDX_SHIFT 0
74#define PIDX(x) ((x) << PIDX_SHIFT) 74#define PIDX(x) ((x) << PIDX_SHIFT)
75#define S_PIDX_T5 0 75#define PIDX_SHIFT_T5 0
76#define M_PIDX_T5 0x1fffU 76#define PIDX_T5(x) ((x) << PIDX_SHIFT_T5)
77#define PIDX_T5(x) (((x) >> S_PIDX_T5) & M_PIDX_T5)
78 77
79 78
80#define SGE_TIMERREGS 6 79#define SGE_TIMERREGS 6
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
index a5fb9493dee8..85036e6b42c4 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
@@ -1208,7 +1208,10 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
1208 lso->ipid_ofst = cpu_to_be16(0); 1208 lso->ipid_ofst = cpu_to_be16(0);
1209 lso->mss = cpu_to_be16(ssi->gso_size); 1209 lso->mss = cpu_to_be16(ssi->gso_size);
1210 lso->seqno_offset = cpu_to_be32(0); 1210 lso->seqno_offset = cpu_to_be32(0);
1211 lso->len = cpu_to_be32(skb->len); 1211 if (is_t4(adapter->params.chip))
1212 lso->len = cpu_to_be32(skb->len);
1213 else
1214 lso->len = cpu_to_be32(LSO_T5_XFER_SIZE(skb->len));
1212 1215
1213 /* 1216 /*
1214 * Set up TX Packet CPL pointer, control word and perform 1217 * Set up TX Packet CPL pointer, control word and perform