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.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 65aeca8e5147..0eec84382b56 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -10412,8 +10412,12 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
10412 tp->tg3_flags &= ~TG3_FLAG_EEPROM_WRITE_PROT; 10412 tp->tg3_flags &= ~TG3_FLAG_EEPROM_WRITE_PROT;
10413 tp->tg3_flags2 |= TG3_FLG2_IS_NIC; 10413 tp->tg3_flags2 |= TG3_FLG2_IS_NIC;
10414 } 10414 }
10415 if (tr32(VCPU_CFGSHDW) & VCPU_CFGSHDW_ASPM_DBNC) 10415 val = tr32(VCPU_CFGSHDW);
10416 if (val & VCPU_CFGSHDW_ASPM_DBNC)
10416 tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND; 10417 tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
10418 if ((val & VCPU_CFGSHDW_WOL_ENABLE) &&
10419 (val & VCPU_CFGSHDW_WOL_MAGPKT))
10420 tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
10417 return; 10421 return;
10418 } 10422 }
10419 10423
@@ -10536,6 +10540,10 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
10536 !(nic_cfg & NIC_SRAM_DATA_CFG_FIBER_WOL)) 10540 !(nic_cfg & NIC_SRAM_DATA_CFG_FIBER_WOL))
10537 tp->tg3_flags &= ~TG3_FLAG_WOL_CAP; 10541 tp->tg3_flags &= ~TG3_FLAG_WOL_CAP;
10538 10542
10543 if (tp->tg3_flags & TG3_FLAG_WOL_CAP &&
10544 nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE)
10545 tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
10546
10539 if (cfg2 & (1 << 17)) 10547 if (cfg2 & (1 << 17))
10540 tp->tg3_flags2 |= TG3_FLG2_CAPACITIVE_COUPLING; 10548 tp->tg3_flags2 |= TG3_FLG2_CAPACITIVE_COUPLING;
10541 10549
@@ -11454,11 +11462,6 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
11454 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) 11462 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755)
11455 tp->rx_std_max_post = 8; 11463 tp->rx_std_max_post = 8;
11456 11464
11457 /* By default, disable wake-on-lan. User can change this
11458 * using ETHTOOL_SWOL.
11459 */
11460 tp->tg3_flags &= ~TG3_FLAG_WOL_ENABLE;
11461
11462 if (tp->tg3_flags & TG3_FLAG_ASPM_WORKAROUND) 11465 if (tp->tg3_flags & TG3_FLAG_ASPM_WORKAROUND)
11463 tp->pwrmgmt_thresh = tr32(PCIE_PWR_MGMT_THRESH) & 11466 tp->pwrmgmt_thresh = tr32(PCIE_PWR_MGMT_THRESH) &
11464 PCIE_PWR_MGMT_L1_THRESH_MSK; 11467 PCIE_PWR_MGMT_L1_THRESH_MSK;