Skip to content

Commit 34a568a

Browse files
tsbogenddavem330
authored andcommitted
net: sgi: ioc3-eth: Remove phy workaround
Commit a8d0f11 ("MIPS: SGI-IP27: Enable ethernet phy on second Origin 200 module") fixes the root cause of not detected PHYs. Therefore the workaround can go away now. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent fbd4360 commit 34a568a

1 file changed

Lines changed: 6 additions & 23 deletions

File tree

‎drivers/net/ethernet/sgi/ioc3-eth.c‎

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -582,40 +582,23 @@ static void ioc3_timer(struct timer_list *t)
582582

583583
/* Try to find a PHY. There is no apparent relation between the MII addresses
584584
* in the SGI documentation and what we find in reality, so we simply probe
585-
* for the PHY. It seems IOC3 PHYs usually live on address 31. One of my
586-
* onboard IOC3s has the special oddity that probing doesn't seem to find it
587-
* yet the interface seems to work fine, so if probing fails we for now will
588-
* simply default to PHY 31 instead of bailing out.
585+
* for the PHY.
589586
*/
590587
static int ioc3_mii_init(struct ioc3_private *ip)
591588
{
592-
int ioc3_phy_workaround = 1;
593-
int i, found = 0, res = 0;
594589
u16 word;
590+
int i;
595591

596592
for (i = 0; i < 32; i++) {
597593
word = ioc3_mdio_read(ip->mii.dev, i, MII_PHYSID1);
598594

599595
if (word != 0xffff && word != 0x0000) {
600-
found = 1;
601-
break; /* Found a PHY */
596+
ip->mii.phy_id = i;
597+
return 0;
602598
}
603599
}
604-
605-
if (!found) {
606-
if (ioc3_phy_workaround) {
607-
i = 31;
608-
} else {
609-
ip->mii.phy_id = -1;
610-
res = -ENODEV;
611-
goto out;
612-
}
613-
}
614-
615-
ip->mii.phy_id = i;
616-
617-
out:
618-
return res;
600+
ip->mii.phy_id = -1;
601+
return -ENODEV;
619602
}
620603

621604
static void ioc3_mii_start(struct ioc3_private *ip)

0 commit comments

Comments
 (0)