diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 574fe9785f3c..09fe06784432 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -13639,6 +13639,21 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
13639 | tp->fw_needed = FIRMWARE_TG3TSO; | 13639 | tp->fw_needed = FIRMWARE_TG3TSO; |
13640 | } | 13640 | } |
13641 | 13641 | ||
13642 | /* Selectively allow TSO based on operating conditions */ | ||
13643 | if ((tg3_flag(tp, HW_TSO_1) || | ||
13644 | tg3_flag(tp, HW_TSO_2) || | ||
13645 | tg3_flag(tp, HW_TSO_3)) || | ||
13646 | (tp->fw_needed && !tg3_flag(tp, ENABLE_ASF))) | ||
13647 | tg3_flag_set(tp, TSO_CAPABLE); | ||
13648 | else { | ||
13649 | tg3_flag_clear(tp, TSO_CAPABLE); | ||
13650 | tg3_flag_clear(tp, TSO_BUG); | ||
13651 | tp->fw_needed = NULL; | ||
13652 | } | ||
13653 | |||
13654 | if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0) | ||
13655 | tp->fw_needed = FIRMWARE_TG3; | ||
13656 | |||
13642 | tp->irq_max = 1; | 13657 | tp->irq_max = 1; |
13643 | 13658 | ||
13644 | if (tg3_flag(tp, 5750_PLUS)) { | 13659 | if (tg3_flag(tp, 5750_PLUS)) { |
@@ -13705,6 +13720,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
13705 | if (lnkctl & PCI_EXP_LNKCTL_CLKREQ_EN) { | 13720 | if (lnkctl & PCI_EXP_LNKCTL_CLKREQ_EN) { |
13706 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) | 13721 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) |
13707 | tg3_flag_clear(tp, HW_TSO_2); | 13722 | tg3_flag_clear(tp, HW_TSO_2); |
13723 | tg3_flag_clear(tp, TSO_CAPABLE); | ||
13708 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 || | 13724 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 || |
13709 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 || | 13725 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 || |
13710 | tp->pci_chip_rev_id == CHIPREV_ID_57780_A0 || | 13726 | tp->pci_chip_rev_id == CHIPREV_ID_57780_A0 || |
@@ -15044,21 +15060,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
15044 | 15060 | ||
15045 | tg3_init_bufmgr_config(tp); | 15061 | tg3_init_bufmgr_config(tp); |
15046 | 15062 | ||
15047 | /* Selectively allow TSO based on operating conditions */ | ||
15048 | if ((tg3_flag(tp, HW_TSO_1) || | ||
15049 | tg3_flag(tp, HW_TSO_2) || | ||
15050 | tg3_flag(tp, HW_TSO_3)) || | ||
15051 | (tp->fw_needed && !tg3_flag(tp, ENABLE_ASF))) | ||
15052 | tg3_flag_set(tp, TSO_CAPABLE); | ||
15053 | else { | ||
15054 | tg3_flag_clear(tp, TSO_CAPABLE); | ||
15055 | tg3_flag_clear(tp, TSO_BUG); | ||
15056 | tp->fw_needed = NULL; | ||
15057 | } | ||
15058 | |||
15059 | if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0) | ||
15060 | tp->fw_needed = FIRMWARE_TG3; | ||
15061 | |||
15062 | /* TSO is on by default on chips that support hardware TSO. | 15063 | /* TSO is on by default on chips that support hardware TSO. |
15063 | * Firmware TSO on older chips gives lower performance, so it | 15064 | * Firmware TSO on older chips gives lower performance, so it |
15064 | * is off by default, but can be enabled using ethtool. | 15065 | * is off by default, but can be enabled using ethtool. |