aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2010-12-06 03:28:53 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-06 14:03:48 -0500
commita386b9011a4687470e6168e2f2a08c468f25f72f (patch)
tree4f4c8d2dd7fe42d85e950302a71290d3db1fcc61 /drivers/net/tg3.c
parenta6b68dab169e2a51e59f43504f1279cbc2afcde8 (diff)
tg3: Relax EEE thresholds
The hardware defaults to fairly aggressive EEE thresholds. While there appear to be no ill effects, this patch relaxes them, just as a precaution. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 81dafc26cdff..bb95c6ecda49 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -7819,11 +7819,26 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
7819 tw32_f(TG3_CPMU_EEE_CTRL, 7819 tw32_f(TG3_CPMU_EEE_CTRL,
7820 TG3_CPMU_EEE_CTRL_EXIT_20_1_US); 7820 TG3_CPMU_EEE_CTRL_EXIT_20_1_US);
7821 7821
7822 tw32_f(TG3_CPMU_EEE_MODE, 7822 val = TG3_CPMU_EEEMD_ERLY_L1_XIT_DET |
7823 TG3_CPMU_EEEMD_ERLY_L1_XIT_DET | 7823 TG3_CPMU_EEEMD_LPI_IN_TX |
7824 TG3_CPMU_EEEMD_LPI_IN_TX | 7824 TG3_CPMU_EEEMD_LPI_IN_RX |
7825 TG3_CPMU_EEEMD_LPI_IN_RX | 7825 TG3_CPMU_EEEMD_EEE_ENABLE;
7826 TG3_CPMU_EEEMD_EEE_ENABLE); 7826
7827 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717)
7828 val |= TG3_CPMU_EEEMD_SND_IDX_DET_EN;
7829
7830 if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE)
7831 val |= TG3_CPMU_EEEMD_APE_TX_DET_EN;
7832
7833 tw32_f(TG3_CPMU_EEE_MODE, val);
7834
7835 tw32_f(TG3_CPMU_EEE_DBTMR1,
7836 TG3_CPMU_DBTMR1_PCIEXIT_2047US |
7837 TG3_CPMU_DBTMR1_LNKIDLE_2047US);
7838
7839 tw32_f(TG3_CPMU_EEE_DBTMR2,
7840 TG3_CPMU_DBTMR1_APE_TX_2047US |
7841 TG3_CPMU_DBTMR2_TXIDXEQ_2047US);
7827 } 7842 }
7828 7843
7829 if (reset_phy) 7844 if (reset_phy)