diff options
author | Florian Fainelli <florian@openwrt.org> | 2009-05-26 19:38:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-27 18:46:53 -0400 |
commit | 824fb38e99cd5334629b340a2ae1ba0917cc35ab (patch) | |
tree | d2b963179fc4839cf1cc2740ff294452bf3fabce /drivers/net/r6040.c | |
parent | a2a804cddfe65f18f903985e8a8d04c7c9eec354 (diff) |
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>
Diffstat (limited to 'drivers/net/r6040.c')
-rw-r--r-- | drivers/net/r6040.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 1508b124e3d8..ed63d23a6452 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) | |||
401 | * we may got called by r6040_tx_timeout which has left | 401 | * we may got called by r6040_tx_timeout which has left |
402 | * some unsent tx buffers */ | 402 | * some unsent tx buffers */ |
403 | iowrite16(0x01, ioaddr + MTPR); | 403 | iowrite16(0x01, ioaddr + MTPR); |
404 | |||
405 | /* Check media */ | ||
406 | mii_check_media(&lp->mii_if, 1, 1); | ||
404 | } | 407 | } |
405 | 408 | ||
406 | static void r6040_tx_timeout(struct net_device *dev) | 409 | static void r6040_tx_timeout(struct net_device *dev) |
@@ -528,6 +531,8 @@ static int r6040_phy_mode_chk(struct net_device *dev) | |||
528 | phy_dat = 0x0000; | 531 | phy_dat = 0x0000; |
529 | } | 532 | } |
530 | 533 | ||
534 | mii_check_media(&lp->mii_if, 0, 1); | ||
535 | |||
531 | return phy_dat; | 536 | return phy_dat; |
532 | }; | 537 | }; |
533 | 538 | ||
@@ -810,7 +815,6 @@ static void r6040_timer(unsigned long data) | |||
810 | lp->phy_mode = phy_mode; | 815 | lp->phy_mode = phy_mode; |
811 | lp->mcr0 = (lp->mcr0 & 0x7fff) | phy_mode; | 816 | lp->mcr0 = (lp->mcr0 & 0x7fff) | phy_mode; |
812 | iowrite16(lp->mcr0, ioaddr); | 817 | iowrite16(lp->mcr0, ioaddr); |
813 | printk(KERN_INFO "Link Change %x \n", ioread16(ioaddr)); | ||
814 | } | 818 | } |
815 | 819 | ||
816 | /* Timer active again */ | 820 | /* Timer active again */ |