Commit a3ca50f9 authored by David S. Miller's avatar David S. Miller

[TG3]: Kill 'force' arg to tg3_phy_reset, it is always set.

parent 9c4495e3
...@@ -664,7 +664,7 @@ static int tg3_phy_reset_5703_4_5(struct tg3 *tp) ...@@ -664,7 +664,7 @@ static int tg3_phy_reset_5703_4_5(struct tg3 *tp)
/* This will reset the tigon3 PHY if there is no valid /* This will reset the tigon3 PHY if there is no valid
* link unless the FORCE argument is non-zero. * link unless the FORCE argument is non-zero.
*/ */
static int tg3_phy_reset(struct tg3 *tp, int force) static int tg3_phy_reset(struct tg3 *tp)
{ {
u32 phy_status; u32 phy_status;
int err; int err;
...@@ -674,12 +674,6 @@ static int tg3_phy_reset(struct tg3 *tp, int force) ...@@ -674,12 +674,6 @@ static int tg3_phy_reset(struct tg3 *tp, int force)
if (err != 0) if (err != 0)
return -EBUSY; return -EBUSY;
/* If we have link, and not forcing a reset, then nothing
* to do.
*/
if ((phy_status & BMSR_LSTATUS) != 0 && (force == 0))
return 0;
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 || if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 || GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
...@@ -1265,7 +1259,7 @@ static int tg3_setup_copper_phy(struct tg3 *tp, int force_reset) ...@@ -1265,7 +1259,7 @@ static int tg3_setup_copper_phy(struct tg3 *tp, int force_reset)
force_reset = 1; force_reset = 1;
} }
if (force_reset) if (force_reset)
tg3_phy_reset(tp, 1); tg3_phy_reset(tp);
if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) { if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) {
tg3_readphy(tp, MII_BMSR, &bmsr); tg3_readphy(tp, MII_BMSR, &bmsr);
...@@ -1292,7 +1286,7 @@ static int tg3_setup_copper_phy(struct tg3 *tp, int force_reset) ...@@ -1292,7 +1286,7 @@ static int tg3_setup_copper_phy(struct tg3 *tp, int force_reset)
if ((tp->phy_id & PHY_ID_REV_MASK) == PHY_REV_BCM5401_B0 && if ((tp->phy_id & PHY_ID_REV_MASK) == PHY_REV_BCM5401_B0 &&
!(bmsr & BMSR_LSTATUS) && !(bmsr & BMSR_LSTATUS) &&
tp->link_config.active_speed == SPEED_1000) { tp->link_config.active_speed == SPEED_1000) {
err = tg3_phy_reset(tp, 1); err = tg3_phy_reset(tp);
if (!err) if (!err)
err = tg3_init_5401phy_dsp(tp); err = tg3_init_5401phy_dsp(tp);
if (err) if (err)
...@@ -6491,7 +6485,7 @@ static int __devinit tg3_phy_probe(struct tg3 *tp) ...@@ -6491,7 +6485,7 @@ static int __devinit tg3_phy_probe(struct tg3 *tp)
} }
} }
err = tg3_phy_reset(tp, 1); err = tg3_phy_reset(tp);
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment