Lines 5392-5398
static netdev_tx_t tg3_start_xmit_dma_bu
Link Here
|
5392 |
mss = 0; |
5392 |
mss = 0; |
5393 |
if ((mss = skb_shinfo(skb)->gso_size) != 0) { |
5393 |
if ((mss = skb_shinfo(skb)->gso_size) != 0) { |
5394 |
struct iphdr *iph; |
5394 |
struct iphdr *iph; |
5395 |
int tcp_opt_len, ip_tcp_len, hdr_len; |
5395 |
u32 tcp_opt_len, ip_tcp_len, hdr_len; |
5396 |
|
5396 |
|
5397 |
if (skb_header_cloned(skb) && |
5397 |
if (skb_header_cloned(skb) && |
5398 |
pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { |
5398 |
pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { |
Lines 5423-5430
static netdev_tx_t tg3_start_xmit_dma_bu
Link Here
|
5423 |
IPPROTO_TCP, |
5423 |
IPPROTO_TCP, |
5424 |
0); |
5424 |
0); |
5425 |
|
5425 |
|
5426 |
if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO) || |
5426 |
if (tp->tg3_flags2 & TG3_FLG2_HW_TSO_2) |
5427 |
(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) { |
5427 |
mss |= hdr_len << 9; |
|
|
5428 |
else if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_1) || |
5429 |
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { |
5428 |
if (tcp_opt_len || iph->ihl > 5) { |
5430 |
if (tcp_opt_len || iph->ihl > 5) { |
5429 |
int tsflags; |
5431 |
int tsflags; |
5430 |
|
5432 |
|
Lines 5459-5464
static netdev_tx_t tg3_start_xmit_dma_bu
Link Here
|
5459 |
|
5461 |
|
5460 |
would_hit_hwbug = 0; |
5462 |
would_hit_hwbug = 0; |
5461 |
|
5463 |
|
|
|
5464 |
if ((tp->tg3_flags3 & TG3_FLG3_SHORT_DMA_BUG) && len <= 8) |
5465 |
would_hit_hwbug = 1; |
5466 |
|
5462 |
if (tp->tg3_flags3 & TG3_FLG3_5701_DMA_BUG) |
5467 |
if (tp->tg3_flags3 & TG3_FLG3_5701_DMA_BUG) |
5463 |
would_hit_hwbug = 1; |
5468 |
would_hit_hwbug = 1; |
5464 |
else if (tg3_4g_overflow_test(mapping, len)) |
5469 |
else if (tg3_4g_overflow_test(mapping, len)) |
Lines 5482-5487
static netdev_tx_t tg3_start_xmit_dma_bu
Link Here
|
5482 |
|
5487 |
|
5483 |
tnapi->tx_buffers[entry].skb = NULL; |
5488 |
tnapi->tx_buffers[entry].skb = NULL; |
5484 |
|
5489 |
|
|
|
5490 |
|
5491 |
if ((tp->tg3_flags3 & TG3_FLG3_SHORT_DMA_BUG) && |
5492 |
len <= 8) |
5493 |
would_hit_hwbug = 1; |
5494 |
|
5485 |
if (tg3_4g_overflow_test(mapping, len)) |
5495 |
if (tg3_4g_overflow_test(mapping, len)) |
5486 |
would_hit_hwbug = 1; |
5496 |
would_hit_hwbug = 1; |
5487 |
|
5497 |
|
Lines 12595-12610
static int __devinit tg3_get_invariants(
Link Here
|
12595 |
tp->pdev_peer == tp->pdev)) |
12605 |
tp->pdev_peer == tp->pdev)) |
12596 |
tp->tg3_flags &= ~TG3_FLAG_SUPPORT_MSI; |
12606 |
tp->tg3_flags &= ~TG3_FLAG_SUPPORT_MSI; |
12597 |
|
12607 |
|
12598 |
if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) || |
12608 |
if (!(tp->tg3_flags3 & TG3_FLG3_5755_PLUS)) { |
12599 |
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { |
12609 |
tp->tg3_flags3 |= TG3_FLG3_4G_DMA_BNDRY_BUG; |
12600 |
tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2; |
12610 |
tp->tg3_flags3 |= TG3_FLG3_40BIT_DMA_LIMIT_BUG; |
12601 |
tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI; |
12611 |
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) |
12602 |
} else { |
12612 |
tp->tg3_flags3 |= TG3_FLG3_SHORT_DMA_BUG; |
12603 |
tp->tg3_flags2 |= TG3_FLG2_HW_TSO_1 | TG3_FLG2_TSO_BUG; |
12613 |
else { |
12604 |
if (GET_ASIC_REV(tp->pci_chip_rev_id) == |
12614 |
tp->tg3_flags3 |= TG3_FLG3_4G_DMA_BNDRY_BUG; |
12605 |
ASIC_REV_5750 && |
12615 |
tp->tg3_flags3 |= TG3_FLG3_40BIT_DMA_LIMIT_BUG; |
12606 |
tp->pci_chip_rev_id >= CHIPREV_ID_5750_C2) |
12616 |
} |
12607 |
tp->tg3_flags2 &= ~TG3_FLG2_TSO_BUG; |
|
|
12608 |
} |
12617 |
} |
12609 |
} |
12618 |
} |
12610 |
|
12619 |
|
Lines 13975-13982
static int __devinit tg3_init_one(struct
Link Here
|
13975 |
goto err_out_iounmap; |
13984 |
goto err_out_iounmap; |
13976 |
} |
13985 |
} |
13977 |
|
13986 |
|
13978 |
if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) || |
13987 |
if (tp->tg3_flags3 & TG3_FLG3_5755_PLUS) |
13979 |
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) |
|
|
13980 |
dev->netdev_ops = &tg3_netdev_ops; |
13988 |
dev->netdev_ops = &tg3_netdev_ops; |
13981 |
else |
13989 |
else |
13982 |
dev->netdev_ops = &tg3_netdev_ops_dma_bug; |
13990 |
dev->netdev_ops = &tg3_netdev_ops_dma_bug; |