diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/tg3.c | 20 | ||||
-rw-r--r-- | drivers/net/tg3.h | 2 |
2 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 81a1c2e1a3f5..26c6ac48288c 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -64,8 +64,8 @@ | |||
64 | 64 | ||
65 | #define DRV_MODULE_NAME "tg3" | 65 | #define DRV_MODULE_NAME "tg3" |
66 | #define PFX DRV_MODULE_NAME ": " | 66 | #define PFX DRV_MODULE_NAME ": " |
67 | #define DRV_MODULE_VERSION "3.73" | 67 | #define DRV_MODULE_VERSION "3.74" |
68 | #define DRV_MODULE_RELDATE "February 12, 2007" | 68 | #define DRV_MODULE_RELDATE "February 20, 2007" |
69 | 69 | ||
70 | #define TG3_DEF_MAC_MODE 0 | 70 | #define TG3_DEF_MAC_MODE 0 |
71 | #define TG3_DEF_RX_MODE 0 | 71 | #define TG3_DEF_RX_MODE 0 |
@@ -3993,7 +3993,10 @@ static int tg3_tso_bug(struct tg3 *tp, struct sk_buff *skb) | |||
3993 | /* Estimate the number of fragments in the worst case */ | 3993 | /* Estimate the number of fragments in the worst case */ |
3994 | if (unlikely(tg3_tx_avail(tp) <= (skb_shinfo(skb)->gso_segs * 3))) { | 3994 | if (unlikely(tg3_tx_avail(tp) <= (skb_shinfo(skb)->gso_segs * 3))) { |
3995 | netif_stop_queue(tp->dev); | 3995 | netif_stop_queue(tp->dev); |
3996 | return NETDEV_TX_BUSY; | 3996 | if (tg3_tx_avail(tp) <= (skb_shinfo(skb)->gso_segs * 3)) |
3997 | return NETDEV_TX_BUSY; | ||
3998 | |||
3999 | netif_wake_queue(tp->dev); | ||
3997 | } | 4000 | } |
3998 | 4001 | ||
3999 | segs = skb_gso_segment(skb, tp->dev->features & ~NETIF_F_TSO); | 4002 | segs = skb_gso_segment(skb, tp->dev->features & ~NETIF_F_TSO); |
@@ -4061,7 +4064,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) | |||
4061 | 4064 | ||
4062 | hdr_len = ip_tcp_len + tcp_opt_len; | 4065 | hdr_len = ip_tcp_len + tcp_opt_len; |
4063 | if (unlikely((ETH_HLEN + hdr_len) > 80) && | 4066 | if (unlikely((ETH_HLEN + hdr_len) > 80) && |
4064 | (tp->tg3_flags2 & TG3_FLG2_HW_TSO_1_BUG)) | 4067 | (tp->tg3_flags2 & TG3_FLG2_TSO_BUG)) |
4065 | return (tg3_tso_bug(tp, skb)); | 4068 | return (tg3_tso_bug(tp, skb)); |
4066 | 4069 | ||
4067 | base_flags |= (TXD_FLAG_CPU_PRE_DMA | | 4070 | base_flags |= (TXD_FLAG_CPU_PRE_DMA | |
@@ -8137,7 +8140,7 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e | |||
8137 | (ering->rx_jumbo_pending > TG3_RX_JUMBO_RING_SIZE - 1) || | 8140 | (ering->rx_jumbo_pending > TG3_RX_JUMBO_RING_SIZE - 1) || |
8138 | (ering->tx_pending > TG3_TX_RING_SIZE - 1) || | 8141 | (ering->tx_pending > TG3_TX_RING_SIZE - 1) || |
8139 | (ering->tx_pending <= MAX_SKB_FRAGS) || | 8142 | (ering->tx_pending <= MAX_SKB_FRAGS) || |
8140 | ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_1_BUG) && | 8143 | ((tp->tg3_flags2 & TG3_FLG2_TSO_BUG) && |
8141 | (ering->tx_pending <= (MAX_SKB_FRAGS * 3)))) | 8144 | (ering->tx_pending <= (MAX_SKB_FRAGS * 3)))) |
8142 | return -EINVAL; | 8145 | return -EINVAL; |
8143 | 8146 | ||
@@ -10557,12 +10560,11 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10557 | tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2; | 10560 | tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2; |
10558 | tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI; | 10561 | tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI; |
10559 | } else { | 10562 | } else { |
10560 | tp->tg3_flags2 |= TG3_FLG2_HW_TSO_1 | | 10563 | tp->tg3_flags2 |= TG3_FLG2_HW_TSO_1 | TG3_FLG2_TSO_BUG; |
10561 | TG3_FLG2_HW_TSO_1_BUG; | ||
10562 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == | 10564 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == |
10563 | ASIC_REV_5750 && | 10565 | ASIC_REV_5750 && |
10564 | tp->pci_chip_rev_id >= CHIPREV_ID_5750_C2) | 10566 | tp->pci_chip_rev_id >= CHIPREV_ID_5750_C2) |
10565 | tp->tg3_flags2 &= ~TG3_FLG2_HW_TSO_1_BUG; | 10567 | tp->tg3_flags2 &= ~TG3_FLG2_TSO_BUG; |
10566 | } | 10568 | } |
10567 | } | 10569 | } |
10568 | 10570 | ||
@@ -11867,7 +11869,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
11867 | (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { | 11869 | (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { |
11868 | tp->tg3_flags2 &= ~TG3_FLG2_TSO_CAPABLE; | 11870 | tp->tg3_flags2 &= ~TG3_FLG2_TSO_CAPABLE; |
11869 | } else { | 11871 | } else { |
11870 | tp->tg3_flags2 |= TG3_FLG2_TSO_CAPABLE; | 11872 | tp->tg3_flags2 |= TG3_FLG2_TSO_CAPABLE | TG3_FLG2_TSO_BUG; |
11871 | } | 11873 | } |
11872 | 11874 | ||
11873 | /* TSO is on by default on chips that support hardware TSO. | 11875 | /* TSO is on by default on chips that support hardware TSO. |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 45d477e8f374..086892d8c1f1 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2227,7 +2227,7 @@ struct tg3 { | |||
2227 | #define TG3_FLAG_INIT_COMPLETE 0x80000000 | 2227 | #define TG3_FLAG_INIT_COMPLETE 0x80000000 |
2228 | u32 tg3_flags2; | 2228 | u32 tg3_flags2; |
2229 | #define TG3_FLG2_RESTART_TIMER 0x00000001 | 2229 | #define TG3_FLG2_RESTART_TIMER 0x00000001 |
2230 | #define TG3_FLG2_HW_TSO_1_BUG 0x00000002 | 2230 | #define TG3_FLG2_TSO_BUG 0x00000002 |
2231 | #define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 | 2231 | #define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 |
2232 | #define TG3_FLG2_IS_5788 0x00000008 | 2232 | #define TG3_FLG2_IS_5788 0x00000008 |
2233 | #define TG3_FLG2_MAX_RXPEND_64 0x00000010 | 2233 | #define TG3_FLG2_MAX_RXPEND_64 0x00000010 |