]> git.hungrycats.org Git - linux/commitdiff
[PATCH] via-rhine: de-isolate PHY
authorAndrew Morton <akpm@osdl.org>
Tue, 24 Aug 2004 19:34:52 +0000 (15:34 -0400)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 24 Aug 2004 19:34:52 +0000 (15:34 -0400)
From: Roger Luethi <rl@hellgate.ch>

PHYs may come up isolated.  Make sure we can send data to them.  This code
section needs a clean-up, but I prefer to merge this fix in isolation.

Report and suggested fix by Tam, Ming Dat (Tommy).

Signed-off-by: Roger Luethi <rl@hellgate.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
drivers/net/via-rhine.c

index caca5ed9721e0b62e22fa2411803f74f3495a17f..ef09aa8a2dc38cbfb64200d09547ad7d03f936ea 100644 (file)
@@ -896,7 +896,10 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
        pci_set_drvdata(pdev, dev);
 
        {
+               u16 mii_cmd;
                int mii_status = mdio_read(dev, phy_id, 1);
+               mii_cmd = mdio_read(dev, phy_id, MII_BMCR) & ~BMCR_ISOLATE;
+               mdio_write(dev, phy_id, MII_BMCR, mii_cmd);
                if (mii_status != 0xffff && mii_status != 0x0000) {
                        rp->mii_if.advertising = mdio_read(dev, phy_id, 4);
                        printk(KERN_INFO "%s: MII PHY found at address "