]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
tg3: Remove unused link config code
authorMatt Carlson <mcarlson@broadcom.com>
Mon, 13 Feb 2012 15:20:14 +0000 (15:20 +0000)
committerJoe Jin <joe.jin@oracle.com>
Tue, 28 Aug 2012 07:21:33 +0000 (15:21 +0800)
When tg3 devices are shutdown, the driver uses the
TG3_PHYFLG_IS_LOW_POWER flag to enable a static phy configuration.
Any attempt to use the link configuration variables is dead code.  This
patch removes such code.

(cherry picked from commit 2855b9fe416e55d01a1946b142d87abd4cceb6ea)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/tg3.c

index 9744b36977d73662250bb5d1c3343ed1e18844b5..097691688e89a127a9641c0461324b03953ae6b8 100644 (file)
@@ -3611,12 +3611,8 @@ static int tg3_power_down_prepare(struct tg3 *tp)
                        tp->link_config.orig_autoneg = tp->link_config.autoneg;
                }
 
-               if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) {
-                       tp->link_config.speed = SPEED_10;
-                       tp->link_config.duplex = DUPLEX_HALF;
-                       tp->link_config.autoneg = AUTONEG_ENABLE;
+               if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES))
                        tg3_setup_phy(tp, 0);
-               }
        }
 
        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {