In the following patch by Florian Fainelli - 2010-05-16, the added call to mii_check_media() has the "printit" flag, the 2nd parameter, set which causes a status message to be logged once per second. diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 4122916..eeee379 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c @@ -400,9 +400,6 @@ 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) @@ -530,8 +527,6 @@ static int r6040_phy_mode_chk(struct net_device *dev) phy_dat = 0x0000; } - mii_check_media(&lp->mii_if, 0, 1); - return phy_dat; }; @@ -813,6 +808,9 @@ static void r6040_timer(unsigned long data) /* Timer active again */ mod_timer(&lp->timer, round_jiffies(jiffies + HZ)); + + /* Check media */ + mii_check_media(&lp->mii_if, 1, 1); } /* Read/set MAC address routines */
I saw same trouble in 2.6.35.13 and EVA-X4150 SoC with integrated RDC network controller. I make workaround in my distro, but it looks some ugly, possible it'll be better to set init_media to 0 - but I afraid that this can cause new bugs. In any case, it works. Here is patch: --- drivers/net/r6040.c.orig 2011-04-28 18:21:24.000000000 +0300 +++ drivers/net/r6040.c 2011-07-12 01:18:50.019755735 +0300 @@ -810,7 +810,7 @@ mod_timer(&lp->timer, round_jiffies(jiffies + HZ)); /* Check media */ - mii_check_media(&lp->mii_if, 1, 1); + mii_check_media(&lp->mii_if, (netif_carrier_ok(lp->mii_if.dev) != (unsigned int) mii_link_ok(&lp->mii_if)) ? 1 : 0, 1); } /* Read/set MAC address routines */