* [patch 17/18] 3c59x: fix duplex configuration
@ 2007-08-10 21:05 akpm
2007-08-14 5:38 ` Jeff Garzik
2007-08-20 15:06 ` Martin Buck
0 siblings, 2 replies; 3+ messages in thread
From: akpm @ 2007-08-10 21:05 UTC (permalink / raw)
To: jeff; +Cc: netdev, akpm, klassert, mb-tmp-ohtmvyyn.xreary.bet, protasnb
From: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
A special sequence of ifconfig up/down and plug/unplug the cable can break
the duplex configuration of the driver.
Setting
vp->mii.full_duplex = vp->full_duplex
in vortex_up should fix this.
Addresses Bug 8575 3c59x duplex configuration broken
http://bugzilla.kernel.org/show_bug.cgi?id=8575
Cc: Martin Buck <mb-tmp-ohtmvyyn.xreary.bet@gromit.dyndns.org>
Signed-off-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Cc: Natalie Protasevich <protasnb@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/3c59x.c | 1 +
1 files changed, 1 insertion(+)
diff -puN drivers/net/3c59x.c~3c59x-fix-duplex-configuration drivers/net/3c59x.c
--- a/drivers/net/3c59x.c~3c59x-fix-duplex-configuration
+++ a/drivers/net/3c59x.c
@@ -1559,6 +1559,7 @@ vortex_up(struct net_device *dev)
mii_reg1 = mdio_read(dev, vp->phys[0], MII_BMSR);
mii_reg5 = mdio_read(dev, vp->phys[0], MII_LPA);
vp->partner_flow_ctrl = ((mii_reg5 & 0x0400) != 0);
+ vp->mii.full_duplex = vp->full_duplex;
vortex_check_media(dev, 1);
}
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 17/18] 3c59x: fix duplex configuration
2007-08-10 21:05 [patch 17/18] 3c59x: fix duplex configuration akpm
@ 2007-08-14 5:38 ` Jeff Garzik
2007-08-20 15:06 ` Martin Buck
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-08-14 5:38 UTC (permalink / raw)
To: akpm; +Cc: netdev, klassert, mb-tmp-ohtmvyyn.xreary.bet, protasnb
akpm@linux-foundation.org wrote:
> From: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
>
> A special sequence of ifconfig up/down and plug/unplug the cable can break
> the duplex configuration of the driver.
>
> Setting
> vp->mii.full_duplex = vp->full_duplex
> in vortex_up should fix this.
>
> Addresses Bug 8575 3c59x duplex configuration broken
> http://bugzilla.kernel.org/show_bug.cgi?id=8575
>
> Cc: Martin Buck <mb-tmp-ohtmvyyn.xreary.bet@gromit.dyndns.org>
> Signed-off-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
> Cc: Natalie Protasevich <protasnb@gmail.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/net/3c59x.c | 1 +
> 1 files changed, 1 insertion(+)
applied
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 17/18] 3c59x: fix duplex configuration
2007-08-10 21:05 [patch 17/18] 3c59x: fix duplex configuration akpm
2007-08-14 5:38 ` Jeff Garzik
@ 2007-08-20 15:06 ` Martin Buck
1 sibling, 0 replies; 3+ messages in thread
From: Martin Buck @ 2007-08-20 15:06 UTC (permalink / raw)
To: akpm; +Cc: jeff, netdev, klassert, protasnb
On Fri, Aug 10, 2007 at 02:05:26PM -0700, akpm@linux-foundation.org wrote:
[...]
> diff -puN drivers/net/3c59x.c~3c59x-fix-duplex-configuration drivers/net/3c59x.c
> --- a/drivers/net/3c59x.c~3c59x-fix-duplex-configuration
> +++ a/drivers/net/3c59x.c
> @@ -1559,6 +1559,7 @@ vortex_up(struct net_device *dev)
> mii_reg1 = mdio_read(dev, vp->phys[0], MII_BMSR);
> mii_reg5 = mdio_read(dev, vp->phys[0], MII_LPA);
> vp->partner_flow_ctrl = ((mii_reg5 & 0x0400) != 0);
> + vp->mii.full_duplex = vp->full_duplex;
>
> vortex_check_media(dev, 1);
> }
> _
Sorry for the late reply. I finally managed to get my notebook fixed so
that I could actually test this patch. I can confirm that it fixes my
duplex configuration problem. The steps described in
http://bugzilla.kernel.org/show_bug.cgi?id=8575
now result in a Ethernet chip properly configured for full duplex. Thanks
for the fix!
The only remaining issue I have the 3c59x driver is the time required until
it detects link loss when unplugging the Ethernet cable. At the moment,
this needs up to 60 seconds which makes this feature pretty useless. Other
drivers need 2-5 seconds for this which is roughly what I would have
expected. I've been using the patch below sucessfully for a few weeks now
which brings down this time to 5 seconds. Would be nice if somebody could
apply it.
Thanks,
Martin
--- drivers/net/3c59x.c.orig 2007-08-20 17:01:06.000000000 +0200
+++ drivers/net/3c59x.c 2007-08-20 17:02:38.000000000 +0200
@@ -1726,7 +1726,7 @@
struct net_device *dev = (struct net_device *)data;
struct vortex_private *vp = netdev_priv(dev);
void __iomem *ioaddr = vp->ioaddr;
- int next_tick = 60*HZ;
+ int next_tick = 5*HZ;
int ok = 0;
int media_status, old_window;
@@ -1771,9 +1771,6 @@
ok = 1;
}
- if (!netif_carrier_ok(dev))
- next_tick = 5*HZ;
-
if (vp->medialock)
goto leave_media_alone;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-20 15:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-10 21:05 [patch 17/18] 3c59x: fix duplex configuration akpm
2007-08-14 5:38 ` Jeff Garzik
2007-08-20 15:06 ` Martin Buck
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).