From: Tommy Christensen In order to spare some I/O operations, be more intelligent about when to read from the PHY. Pointed out by Bogdan Costescu. Signed-off-by: Tommy S. Christensen Signed-off-by: Andrew Morton --- drivers/net/3c59x.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -puN drivers/net/3c59x.c~3c59x-avoid-blindly-reading-link-status-twice drivers/net/3c59x.c --- 25/drivers/net/3c59x.c~3c59x-avoid-blindly-reading-link-status-twice Fri Sep 9 17:09:47 2005 +++ 25-akpm/drivers/net/3c59x.c Fri Sep 9 17:10:28 2005 @@ -1893,7 +1893,10 @@ vortex_timer(unsigned long data) { spin_lock_bh(&vp->lock); mii_status = mdio_read(dev, vp->phys[0], MII_BMSR); - mii_status = mdio_read(dev, vp->phys[0], MII_BMSR); + if (!(mii_status & BMSR_LSTATUS)) { + /* Re-read to get actual link status */ + mii_status = mdio_read(dev, vp->phys[0], MII_BMSR); + } ok = 1; if (vortex_debug > 2) printk(KERN_DEBUG "%s: MII transceiver has status %4.4x.\n", _