aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2009-11-02 09:25:06 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-03 02:39:02 -0500
commit52cdf8526fe24f11d300b75458ddee017f3f4c88 (patch)
treebbee325ec108529b37633738a69f7830bac876f8 /drivers/net/tg3.c
parent3f0e3ad72393db9c2932a2ca86cc1a49294bbc63 (diff)
tg3: Prevent a PCIe tx glitch
This patch prevents a PCIe tx glitch by allowing the transmitter to go to a low power state. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 1c53250e4007..53a193e0d45c 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -6589,6 +6589,30 @@ static int tg3_chip_reset(struct tg3 *tp)
6589 6589
6590 tg3_mdio_start(tp); 6590 tg3_mdio_start(tp);
6591 6591
6592 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780) {
6593 u8 phy_addr;
6594
6595 phy_addr = tp->phy_addr;
6596 tp->phy_addr = TG3_PHY_PCIE_ADDR;
6597
6598 tg3_writephy(tp, TG3_PCIEPHY_BLOCK_ADDR,
6599 TG3_PCIEPHY_TXB_BLK << TG3_PCIEPHY_BLOCK_SHIFT);
6600 val = TG3_PCIEPHY_TX0CTRL1_TXOCM | TG3_PCIEPHY_TX0CTRL1_RDCTL |
6601 TG3_PCIEPHY_TX0CTRL1_TXCMV | TG3_PCIEPHY_TX0CTRL1_TKSEL |
6602 TG3_PCIEPHY_TX0CTRL1_NB_EN;
6603 tg3_writephy(tp, TG3_PCIEPHY_TX0CTRL1, val);
6604 udelay(10);
6605
6606 tg3_writephy(tp, TG3_PCIEPHY_BLOCK_ADDR,
6607 TG3_PCIEPHY_XGXS_BLK1 << TG3_PCIEPHY_BLOCK_SHIFT);
6608 val = TG3_PCIEPHY_PWRMGMT4_LOWPWR_EN |
6609 TG3_PCIEPHY_PWRMGMT4_L1PLLPD_EN;
6610 tg3_writephy(tp, TG3_PCIEPHY_PWRMGMT4, val);
6611 udelay(10);
6612
6613 tp->phy_addr = phy_addr;
6614 }
6615
6592 if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) && 6616 if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) &&
6593 tp->pci_chip_rev_id != CHIPREV_ID_5750_A0 && 6617 tp->pci_chip_rev_id != CHIPREV_ID_5750_A0 &&
6594 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785 && 6618 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785 &&