diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 6831289baf2a..2d58406deb00 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -5454,7 +5454,12 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb, | |||
5454 | IPPROTO_TCP, | 5454 | IPPROTO_TCP, |
5455 | 0); | 5455 | 0); |
5456 | 5456 | ||
5457 | if (tp->tg3_flags2 & TG3_FLG2_HW_TSO_2) | 5457 | if (tp->tg3_flags2 & TG3_FLG2_HW_TSO_3) { |
5458 | mss |= (hdr_len & 0xc) << 12; | ||
5459 | if (hdr_len & 0x10) | ||
5460 | base_flags |= 0x00000010; | ||
5461 | base_flags |= (hdr_len & 0x3e0) << 5; | ||
5462 | } else if (tp->tg3_flags2 & TG3_FLG2_HW_TSO_2) | ||
5458 | mss |= hdr_len << 9; | 5463 | mss |= hdr_len << 9; |
5459 | else if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_1) || | 5464 | else if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_1) || |
5460 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { | 5465 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { |
@@ -5479,6 +5484,10 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb, | |||
5479 | (vlan_tx_tag_get(skb) << 16)); | 5484 | (vlan_tx_tag_get(skb) << 16)); |
5480 | #endif | 5485 | #endif |
5481 | 5486 | ||
5487 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 && | ||
5488 | !mss && skb->len > ETH_DATA_LEN) | ||
5489 | base_flags |= TXD_FLAG_JMB_PKT; | ||
5490 | |||
5482 | if (skb_dma_map(&tp->pdev->dev, skb, DMA_TO_DEVICE)) { | 5491 | if (skb_dma_map(&tp->pdev->dev, skb, DMA_TO_DEVICE)) { |
5483 | dev_kfree_skb(skb); | 5492 | dev_kfree_skb(skb); |
5484 | goto out_unlock; | 5493 | goto out_unlock; |
@@ -12714,13 +12723,12 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
12714 | } | 12723 | } |
12715 | } | 12724 | } |
12716 | 12725 | ||
12717 | if (!(tp->tg3_flags3 & TG3_FLG3_5755_PLUS)) { | 12726 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || |
12718 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) | 12727 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) |
12719 | tp->tg3_flags3 |= TG3_FLG3_SHORT_DMA_BUG; | 12728 | tp->tg3_flags3 |= TG3_FLG3_SHORT_DMA_BUG; |
12720 | else { | 12729 | else if (!(tp->tg3_flags3 & TG3_FLG3_5755_PLUS)) { |
12721 | tp->tg3_flags3 |= TG3_FLG3_4G_DMA_BNDRY_BUG; | 12730 | tp->tg3_flags3 |= TG3_FLG3_4G_DMA_BNDRY_BUG; |
12722 | tp->tg3_flags3 |= TG3_FLG3_40BIT_DMA_LIMIT_BUG; | 12731 | tp->tg3_flags3 |= TG3_FLG3_40BIT_DMA_LIMIT_BUG; |
12723 | } | ||
12724 | } | 12732 | } |
12725 | 12733 | ||
12726 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) || | 12734 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) || |
@@ -14077,7 +14085,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
14077 | goto err_out_iounmap; | 14085 | goto err_out_iounmap; |
14078 | } | 14086 | } |
14079 | 14087 | ||
14080 | if (tp->tg3_flags3 & TG3_FLG3_5755_PLUS) | 14088 | if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) && |
14089 | tp->pci_chip_rev_id != CHIPREV_ID_5717_A0) | ||
14081 | dev->netdev_ops = &tg3_netdev_ops; | 14090 | dev->netdev_ops = &tg3_netdev_ops; |
14082 | else | 14091 | else |
14083 | dev->netdev_ops = &tg3_netdev_ops_dma_bug; | 14092 | dev->netdev_ops = &tg3_netdev_ops_dma_bug; |