Commit 824fb38e99cd5334629b340a2ae1ba0917cc35ab

Authored by Florian Fainelli
Committed by David S. Miller
1 parent a2a804cddf

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 <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 5 additions and 1 deletions Side-by-side Diff

... ... @@ -401,6 +401,9 @@
401 401 * we may got called by r6040_tx_timeout which has left
402 402 * some unsent tx buffers */
403 403 iowrite16(0x01, ioaddr + MTPR);
  404 +
  405 + /* Check media */
  406 + mii_check_media(&lp->mii_if, 1, 1);
404 407 }
405 408  
406 409 static void r6040_tx_timeout(struct net_device *dev)
... ... @@ -528,6 +531,8 @@
528 531 phy_dat = 0x0000;
529 532 }
530 533  
  534 + mii_check_media(&lp->mii_if, 0, 1);
  535 +
531 536 return phy_dat;
532 537 };
533 538  
... ... @@ -810,7 +815,6 @@
810 815 lp->phy_mode = phy_mode;
811 816 lp->mcr0 = (lp->mcr0 & 0x7fff) | phy_mode;
812 817 iowrite16(lp->mcr0, ioaddr);
813   - printk(KERN_INFO "Link Change %x \n", ioread16(ioaddr));
814 818 }
815 819  
816 820 /* Timer active again */