aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index ba5d3fe753b6..da808250c866 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -5124,7 +5124,8 @@ static int tigon3_dma_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb,
5124 /* Make sure new skb does not cross any 4G boundaries. 5124 /* Make sure new skb does not cross any 4G boundaries.
5125 * Drop the packet if it does. 5125 * Drop the packet if it does.
5126 */ 5126 */
5127 if (ret || tg3_4g_overflow_test(new_addr, new_skb->len)) { 5127 if (ret || ((tp->tg3_flags3 & TG3_FLG3_4G_DMA_BNDRY_BUG) &&
5128 tg3_4g_overflow_test(new_addr, new_skb->len))) {
5128 if (!ret) 5129 if (!ret)
5129 skb_dma_unmap(&tp->pdev->dev, new_skb, 5130 skb_dma_unmap(&tp->pdev->dev, new_skb,
5130 DMA_TO_DEVICE); 5131 DMA_TO_DEVICE);
@@ -5459,9 +5460,15 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb,
5459 5460
5460 would_hit_hwbug = 0; 5461 would_hit_hwbug = 0;
5461 5462
5462 if (tp->tg3_flags3 & TG3_FLG3_5701_DMA_BUG) 5463 if ((tp->tg3_flags3 & TG3_FLG3_4G_DMA_BNDRY_BUG) &&
5464 tg3_4g_overflow_test(mapping, len))
5465 would_hit_hwbug = 1;
5466
5467 if ((tp->tg3_flags3 & TG3_FLG3_40BIT_DMA_LIMIT_BUG) &&
5468 tg3_40bit_overflow_test(tp, mapping, len))
5463 would_hit_hwbug = 1; 5469 would_hit_hwbug = 1;
5464 else if (tg3_4g_overflow_test(mapping, len)) 5470
5471 if (tp->tg3_flags3 & TG3_FLG3_5701_DMA_BUG)
5465 would_hit_hwbug = 1; 5472 would_hit_hwbug = 1;
5466 5473
5467 tg3_set_txd(tnapi, entry, mapping, len, base_flags, 5474 tg3_set_txd(tnapi, entry, mapping, len, base_flags,
@@ -5482,10 +5489,12 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb,
5482 5489
5483 tnapi->tx_buffers[entry].skb = NULL; 5490 tnapi->tx_buffers[entry].skb = NULL;
5484 5491
5485 if (tg3_4g_overflow_test(mapping, len)) 5492 if ((tp->tg3_flags3 & TG3_FLG3_4G_DMA_BNDRY_BUG) &&
5493 tg3_4g_overflow_test(mapping, len))
5486 would_hit_hwbug = 1; 5494 would_hit_hwbug = 1;
5487 5495
5488 if (tg3_40bit_overflow_test(tp, mapping, len)) 5496 if ((tp->tg3_flags3 & TG3_FLG3_40BIT_DMA_LIMIT_BUG) &&
5497 tg3_40bit_overflow_test(tp, mapping, len))
5489 would_hit_hwbug = 1; 5498 would_hit_hwbug = 1;
5490 5499
5491 if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) 5500 if (tp->tg3_flags2 & TG3_FLG2_HW_TSO)
@@ -12610,12 +12619,15 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
12610 12619
12611 tp->irq_max = 1; 12620 tp->irq_max = 1;
12612 12621
12613#ifdef TG3_NAPI
12614 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) { 12622 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) {
12615 tp->tg3_flags |= TG3_FLAG_SUPPORT_MSIX; 12623 tp->tg3_flags |= TG3_FLAG_SUPPORT_MSIX;
12616 tp->irq_max = TG3_IRQ_MAX_VECS; 12624 tp->irq_max = TG3_IRQ_MAX_VECS;
12617 } 12625 }
12618#endif 12626
12627 if (!(tp->tg3_flags3 & TG3_FLG3_5755_PLUS)) {
12628 tp->tg3_flags3 |= TG3_FLG3_4G_DMA_BNDRY_BUG;
12629 tp->tg3_flags3 |= TG3_FLG3_40BIT_DMA_LIMIT_BUG;
12630 }
12619 12631
12620 if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) || 12632 if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) ||
12621 (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) || 12633 (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) ||