]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[TG3]: Power down 5704 serdes transceiver when shutting down.
authorMichael Chan <mchan@broadcom.com>
Tue, 13 Feb 2007 20:17:57 +0000 (12:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Feb 2007 20:17:57 +0000 (12:17 -0800)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c

index b6615f112eaa0b614d200df4ba8274a7b4563b27..604f3085d12afd6f2fdac19eeb709df52278cbb8 100644 (file)
@@ -1175,8 +1175,18 @@ static void tg3_nvram_unlock(struct tg3 *);
 
 static void tg3_power_down_phy(struct tg3 *tp)
 {
-       if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)
+       if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) {
+               if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) {
+                       u32 sg_dig_ctrl = tr32(SG_DIG_CTRL);
+                       u32 serdes_cfg = tr32(MAC_SERDES_CFG);
+
+                       sg_dig_ctrl |=
+                               SG_DIG_USING_HW_AUTONEG | SG_DIG_SOFT_RESET;
+                       tw32(SG_DIG_CTRL, sg_dig_ctrl);
+                       tw32(MAC_SERDES_CFG, serdes_cfg | (1 << 15));
+               }
                return;
+       }
 
        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {
                u32 val;