aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb4/sge.c
diff options
context:
space:
mode:
authorDimitris Michailidis <dm@chelsio.com>2010-08-02 09:19:18 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-02 19:26:41 -0400
commit625ac6ae5739b4da9bdfd44cbac2f9b6fec17db3 (patch)
tree816b2de551b988f64333e418cbc7b73b14474f7f /drivers/net/cxgb4/sge.c
parentba5d3c66e02c3dac66a386b6af0dc9687a4dba67 (diff)
cxgb4: fix TSO descriptors
Commit 1704d74894912b8ecc3e95cecd7bde336a0b1bf2 ("cxgb4vf: small changes to message processing structures/macros") was incomplete and causes cxgb4 to write bad TSO descriptors. Fix that up by reverting the offending part of that commit and adjusting field accesses now that they are one level deeper. Signed-off-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb4/sge.c')
-rw-r--r--drivers/net/cxgb4/sge.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/cxgb4/sge.c b/drivers/net/cxgb4/sge.c
index 304302a71dbc..5cacfc7c53a6 100644
--- a/drivers/net/cxgb4/sge.c
+++ b/drivers/net/cxgb4/sge.c
@@ -931,23 +931,23 @@ out_free: dev_kfree_skb(skb);
931 931
932 ssi = skb_shinfo(skb); 932 ssi = skb_shinfo(skb);
933 if (ssi->gso_size) { 933 if (ssi->gso_size) {
934 struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1); 934 struct cpl_tx_pkt_lso *lso = (void *)wr;
935 bool v6 = (ssi->gso_type & SKB_GSO_TCPV6) != 0; 935 bool v6 = (ssi->gso_type & SKB_GSO_TCPV6) != 0;
936 int l3hdr_len = skb_network_header_len(skb); 936 int l3hdr_len = skb_network_header_len(skb);
937 int eth_xtra_len = skb_network_offset(skb) - ETH_HLEN; 937 int eth_xtra_len = skb_network_offset(skb) - ETH_HLEN;
938 938
939 wr->op_immdlen = htonl(FW_WR_OP(FW_ETH_TX_PKT_WR) | 939 wr->op_immdlen = htonl(FW_WR_OP(FW_ETH_TX_PKT_WR) |
940 FW_WR_IMMDLEN(sizeof(*lso))); 940 FW_WR_IMMDLEN(sizeof(*lso)));
941 lso->lso_ctrl = htonl(LSO_OPCODE(CPL_TX_PKT_LSO) | 941 lso->c.lso_ctrl = htonl(LSO_OPCODE(CPL_TX_PKT_LSO) |
942 LSO_FIRST_SLICE | LSO_LAST_SLICE | 942 LSO_FIRST_SLICE | LSO_LAST_SLICE |
943 LSO_IPV6(v6) | 943 LSO_IPV6(v6) |
944 LSO_ETHHDR_LEN(eth_xtra_len / 4) | 944 LSO_ETHHDR_LEN(eth_xtra_len / 4) |
945 LSO_IPHDR_LEN(l3hdr_len / 4) | 945 LSO_IPHDR_LEN(l3hdr_len / 4) |
946 LSO_TCPHDR_LEN(tcp_hdr(skb)->doff)); 946 LSO_TCPHDR_LEN(tcp_hdr(skb)->doff));
947 lso->ipid_ofst = htons(0); 947 lso->c.ipid_ofst = htons(0);
948 lso->mss = htons(ssi->gso_size); 948 lso->c.mss = htons(ssi->gso_size);
949 lso->seqno_offset = htonl(0); 949 lso->c.seqno_offset = htonl(0);
950 lso->len = htonl(skb->len); 950 lso->c.len = htonl(skb->len);
951 cpl = (void *)(lso + 1); 951 cpl = (void *)(lso + 1);
952 cntrl = TXPKT_CSUM_TYPE(v6 ? TX_CSUM_TCPIP6 : TX_CSUM_TCPIP) | 952 cntrl = TXPKT_CSUM_TYPE(v6 ? TX_CSUM_TCPIP6 : TX_CSUM_TCPIP) |
953 TXPKT_IPHDR_LEN(l3hdr_len) | 953 TXPKT_IPHDR_LEN(l3hdr_len) |