* [PATCH net-next] r6040: check and update media status
@ 2009-05-27 9:38 Florian Fainelli
2009-05-27 22:49 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2009-05-27 9:38 UTC (permalink / raw)
To: netdev, David Miller
Hi David,
This patch is intended to be applied to your net-next-2.6 tree.
I do not bump the release number this time since this
change is not a bugfix but is there for completeness. Thanks !
--
From: Florian Fainelli <florian@openwrt.org>
Subject: [PATCH -next] 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>
---
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index d4ab162..57c31b8 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 */
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] r6040: check and update media status
2009-05-27 9:38 [PATCH net-next] r6040: check and update media status Florian Fainelli
@ 2009-05-27 22:49 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-05-27 22:49 UTC (permalink / raw)
To: florian; +Cc: netdev
From: Florian Fainelli <florian@openwrt.org>
Date: Wed, 27 May 2009 11:38:10 +0200
> Subject: [PATCH -next] 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-27 22:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-27 9:38 [PATCH net-next] r6040: check and update media status Florian Fainelli
2009-05-27 22:49 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).