151
153
MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value");
153
155
static struct pci_device_id tg3_pci_tbl[] = {
154
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5700)},
155
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5701)},
156
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702)},
157
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703)},
158
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704)},
159
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702FE)},
160
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705)},
161
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705_2)},
162
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705M)},
163
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705M_2)},
164
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702X)},
165
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703X)},
166
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704S)},
167
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702A3)},
168
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703A3)},
169
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5782)},
170
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5788)},
171
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5789)},
172
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5901)},
173
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5901_2)},
174
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704S_2)},
175
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705F)},
176
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5720)},
177
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5721)},
178
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5722)},
179
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5750)},
180
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751)},
181
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5750M)},
182
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751M)},
183
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751F)},
184
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5752)},
185
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5752M)},
186
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753)},
187
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753M)},
188
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753F)},
189
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5754)},
190
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5754M)},
191
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5755)},
192
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5755M)},
193
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5756)},
194
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5786)},
195
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787)},
196
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787M)},
197
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5714)},
198
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5714S)},
199
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5715)},
200
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5715S)},
201
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5780)},
202
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5780S)},
203
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5781)},
204
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5906)},
205
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5906M)},
206
{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
207
{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
208
{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
209
{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1001)},
210
{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1003)},
211
{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC9100)},
212
{PCI_DEVICE(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_TIGON3)},
156
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5700,
157
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
158
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5701,
159
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
160
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702,
161
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
162
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703,
163
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
164
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704,
165
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
166
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702FE,
167
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
168
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705,
169
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
170
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705_2,
171
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
172
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705M,
173
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
174
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705M_2,
175
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
176
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702X,
177
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
178
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703X,
179
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
180
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704S,
181
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
182
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702A3,
183
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
184
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5703A3,
185
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
186
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5782,
187
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
188
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5788,
189
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
190
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5789,
191
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
192
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5901,
193
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
194
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5901_2,
195
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
196
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704S_2,
197
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
198
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705F,
199
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
200
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5720,
201
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
202
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5721,
203
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
204
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5750,
205
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
206
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751,
207
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
208
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5750M,
209
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
210
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751M,
211
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
212
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5751F,
213
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
214
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5752,
215
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
216
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5752M,
217
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
218
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753,
219
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
220
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753M,
221
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
222
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753F,
223
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
224
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5714,
225
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
226
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5715,
227
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
228
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5780,
229
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
230
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5780S,
231
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
232
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5781,
233
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
234
{ PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX,
235
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
236
{ PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX,
237
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
238
{ PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000,
239
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
240
{ PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1001,
241
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
242
{ PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1003,
243
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
244
{ PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC9100,
245
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
246
{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_TIGON3,
247
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
216
251
MODULE_DEVICE_TABLE(pci, tg3_pci_tbl);
218
static const struct {
219
254
const char string[ETH_GSTRING_LEN];
220
255
} ethtool_stats_keys[TG3_NUM_STATS] = {
3857
3673
goto out_unlock;
3860
if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6)
3861
mss |= (skb_headlen(skb) - ETH_HLEN) << 9;
3863
tcp_opt_len = ((skb->h.th->doff - 5) * 4);
3864
ip_tcp_len = (skb->nh.iph->ihl * 4) +
3865
sizeof(struct tcphdr);
3867
skb->nh.iph->check = 0;
3868
skb->nh.iph->tot_len = htons(mss + ip_tcp_len +
3870
mss |= (ip_tcp_len + tcp_opt_len) << 9;
3873
base_flags |= (TXD_FLAG_CPU_PRE_DMA |
3874
TXD_FLAG_CPU_POST_DMA);
3876
skb->h.th->check = 0;
3879
else if (skb->ip_summed == CHECKSUM_PARTIAL)
3880
base_flags |= TXD_FLAG_TCPUDP_CSUM;
3883
if (skb->ip_summed == CHECKSUM_PARTIAL)
3884
base_flags |= TXD_FLAG_TCPUDP_CSUM;
3886
#if TG3_VLAN_TAG_USED
3887
if (tp->vlgrp != NULL && vlan_tx_tag_present(skb))
3888
base_flags |= (TXD_FLAG_VLAN |
3889
(vlan_tx_tag_get(skb) << 16));
3892
/* Queue skb data, a.k.a. the main skb fragment. */
3893
mapping = pci_map_single(tp->pdev, skb->data, len, PCI_DMA_TODEVICE);
3895
tp->tx_buffers[entry].skb = skb;
3896
pci_unmap_addr_set(&tp->tx_buffers[entry], mapping, mapping);
3898
tg3_set_txd(tp, entry, mapping, len, base_flags,
3899
(skb_shinfo(skb)->nr_frags == 0) | (mss << 1));
3901
entry = NEXT_TX(entry);
3903
/* Now loop through additional data fragments, and queue them. */
3904
if (skb_shinfo(skb)->nr_frags > 0) {
3905
unsigned int i, last;
3907
last = skb_shinfo(skb)->nr_frags - 1;
3908
for (i = 0; i <= last; i++) {
3909
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
3912
mapping = pci_map_page(tp->pdev,
3915
len, PCI_DMA_TODEVICE);
3917
tp->tx_buffers[entry].skb = NULL;
3918
pci_unmap_addr_set(&tp->tx_buffers[entry], mapping, mapping);
3920
tg3_set_txd(tp, entry, mapping, len,
3921
base_flags, (i == last) | (mss << 1));
3923
entry = NEXT_TX(entry);
3927
/* Packets are ready, update Tx producer idx local and on card. */
3928
tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry);
3930
tp->tx_prod = entry;
3931
if (unlikely(tg3_tx_avail(tp) <= (MAX_SKB_FRAGS + 1))) {
3932
netif_stop_queue(dev);
3933
if (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH(tp))
3934
netif_wake_queue(tp->dev);
3940
dev->trans_start = jiffies;
3942
return NETDEV_TX_OK;
3945
#if TG3_TSO_SUPPORT != 0
3946
static int tg3_start_xmit_dma_bug(struct sk_buff *, struct net_device *);
3948
/* Use GSO to workaround a rare TSO bug that may be triggered when the
3949
* TSO header is greater than 80 bytes.
3951
static int tg3_tso_bug(struct tg3 *tp, struct sk_buff *skb)
3953
struct sk_buff *segs, *nskb;
3955
/* Estimate the number of fragments in the worst case */
3956
if (unlikely(tg3_tx_avail(tp) <= (skb_shinfo(skb)->gso_segs * 3))) {
3957
netif_stop_queue(tp->dev);
3958
return NETDEV_TX_BUSY;
3961
segs = skb_gso_segment(skb, tp->dev->features & ~NETIF_F_TSO);
3962
if (unlikely(IS_ERR(segs)))
3963
goto tg3_tso_bug_end;
3969
tg3_start_xmit_dma_bug(nskb, tp->dev);
3975
return NETDEV_TX_OK;
3979
/* hard_start_xmit for devices that have the 4G bug and/or 40-bit bug and
3980
* support TG3_FLG2_HW_TSO_1 or firmware TSO only.
3982
static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev)
3984
struct tg3 *tp = netdev_priv(dev);
3986
u32 len, entry, base_flags, mss;
3987
int would_hit_hwbug;
3989
len = skb_headlen(skb);
3991
/* We are running in BH disabled context with netif_tx_lock
3992
* and TX reclaim runs via tp->poll inside of a software
3993
* interrupt. Furthermore, IRQ processing runs lockless so we have
3994
* no IRQ context deadlocks to worry about either. Rejoice!
3996
if (unlikely(tg3_tx_avail(tp) <= (skb_shinfo(skb)->nr_frags + 1))) {
3997
if (!netif_queue_stopped(dev)) {
3998
netif_stop_queue(dev);
4000
/* This is a hard error, log it. */
4001
printk(KERN_ERR PFX "%s: BUG! Tx Ring full when "
4002
"queue awake!\n", dev->name);
4004
return NETDEV_TX_BUSY;
4007
entry = tp->tx_prod;
4009
if (skb->ip_summed == CHECKSUM_PARTIAL)
4010
base_flags |= TXD_FLAG_TCPUDP_CSUM;
4011
#if TG3_TSO_SUPPORT != 0
4013
if (skb->len > (tp->dev->mtu + ETH_HLEN) &&
4014
(mss = skb_shinfo(skb)->gso_size) != 0) {
4015
int tcp_opt_len, ip_tcp_len, hdr_len;
4017
if (skb_header_cloned(skb) &&
4018
pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
4023
3676
tcp_opt_len = ((skb->h.th->doff - 5) * 4);
4024
3677
ip_tcp_len = (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr);
4026
hdr_len = ip_tcp_len + tcp_opt_len;
4027
if (unlikely((ETH_HLEN + hdr_len) > 80) &&
4028
(tp->tg3_flags2 & TG3_FLG2_HW_TSO_1_BUG))
4029
return (tg3_tso_bug(tp, skb));
4031
3679
base_flags |= (TXD_FLAG_CPU_PRE_DMA |
4032
3680
TXD_FLAG_CPU_POST_DMA);
4034
3682
skb->nh.iph->check = 0;
4035
skb->nh.iph->tot_len = htons(mss + hdr_len);
3683
skb->nh.iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len);
4036
3684
if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) {
4037
3685
skb->h.th->check = 0;
4038
3686
base_flags &= ~TXD_FLAG_TCPUDP_CSUM;