From: Florian Fainelli Date: Tue, 26 May 2009 23:38:10 +0000 (+0000) Subject: r6040: check and update media status X-Git-Tag: v2.6.31-rc1~330^2~246 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=824fb38e99cd5334629b340a2ae1ba0917cc35ab;p=~shefty%2Frdma-dev.git r6040: check and update media status This patch removes the not-that-useful message in the r6040_timer which prints the PHY status. Instead replace it with a call to mii_check_media which will update the link status and print it on startup. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 1508b124e3d..ed63d23a645 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c @@ -401,6 +401,9 @@ static void r6040_init_mac_regs(struct net_device *dev) * we may got called by r6040_tx_timeout which has left * some unsent tx buffers */ iowrite16(0x01, ioaddr + MTPR); + + /* Check media */ + mii_check_media(&lp->mii_if, 1, 1); } static void r6040_tx_timeout(struct net_device *dev) @@ -528,6 +531,8 @@ static int r6040_phy_mode_chk(struct net_device *dev) phy_dat = 0x0000; } + mii_check_media(&lp->mii_if, 0, 1); + return phy_dat; }; @@ -810,7 +815,6 @@ static void r6040_timer(unsigned long data) lp->phy_mode = phy_mode; lp->mcr0 = (lp->mcr0 & 0x7fff) | phy_mode; iowrite16(lp->mcr0, ioaddr); - printk(KERN_INFO "Link Change %x \n", ioread16(ioaddr)); } /* Timer active again */