Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247726
b: refs/heads/master
c: dabc5c6
h: refs/heads/master
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed May 19, 2011
1 parent 11f1f10 commit 34b43be
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4452d0999906e3e26b718566362e943fcaa3d694
refs/heads/master: dabc5c670d3f86d15ee4f42ab38ec5bd2682487d
31 changes: 16 additions & 15 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -13639,6 +13639,21 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
tp->fw_needed = FIRMWARE_TG3TSO;
}

/* Selectively allow TSO based on operating conditions */
if ((tg3_flag(tp, HW_TSO_1) ||
tg3_flag(tp, HW_TSO_2) ||
tg3_flag(tp, HW_TSO_3)) ||
(tp->fw_needed && !tg3_flag(tp, ENABLE_ASF)))
tg3_flag_set(tp, TSO_CAPABLE);
else {
tg3_flag_clear(tp, TSO_CAPABLE);
tg3_flag_clear(tp, TSO_BUG);
tp->fw_needed = NULL;
}

if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0)
tp->fw_needed = FIRMWARE_TG3;

tp->irq_max = 1;

if (tg3_flag(tp, 5750_PLUS)) {
Expand Down Expand Up @@ -13705,6 +13720,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
if (lnkctl & PCI_EXP_LNKCTL_CLKREQ_EN) {
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
tg3_flag_clear(tp, HW_TSO_2);
tg3_flag_clear(tp, TSO_CAPABLE);
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
tp->pci_chip_rev_id == CHIPREV_ID_57780_A0 ||
Expand Down Expand Up @@ -15044,21 +15060,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,

tg3_init_bufmgr_config(tp);

/* Selectively allow TSO based on operating conditions */
if ((tg3_flag(tp, HW_TSO_1) ||
tg3_flag(tp, HW_TSO_2) ||
tg3_flag(tp, HW_TSO_3)) ||
(tp->fw_needed && !tg3_flag(tp, ENABLE_ASF)))
tg3_flag_set(tp, TSO_CAPABLE);
else {
tg3_flag_clear(tp, TSO_CAPABLE);
tg3_flag_clear(tp, TSO_BUG);
tp->fw_needed = NULL;
}

if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0)
tp->fw_needed = FIRMWARE_TG3;

/* TSO is on by default on chips that support hardware TSO.
* Firmware TSO on older chips gives lower performance, so it
* is off by default, but can be enabled using ethtool.
Expand Down

0 comments on commit 34b43be

Please sign in to comment.