Subject: Re: via_rhine modules error on 2.6.16 with mii-tool

From: Stephen Hemminger <[email-masked]>
Date: Thu, 13 Apr 2006 14:02:52 -0700

On Thu, 13 Apr 2006 22:47:31 +0200
Roger Luethi <[email-masked]> wrote:

> On Thu, 13 Apr 2006 11:40:18 -0700, Stephen Hemminger wrote:
> > The right thing to do is get rid of the locking in via_rhine:netdev_ioctl
> > and push the locking down into mdio_read, mdio_write.
> 
> As I said before, a dozen other network drivers do the exact same thing --
> they call generic_mii_ioctl right after grabbing the private spin lock (and
> only one driver calls generic_mii_ioctl without taking the lock).
> 
>
> I am not keen on patches that make via-rhine more of a special case even if
> it was safe now; next thing you know generic_mii_ioctl is changed in a way
> that breaks the only driver that foolishly made assumptions about the
> side-effects of that function.
> 
> If you can safely move the locking down for all network drivers, that would
> be a different story, of course.
> 
> Roger

Didn't your mother ever tell you that just because everybody else does
it wrong, you don't have to.

The other drivers should be fixed as well.  Phy access with irq's disabled
is not good. The hardware I checked takes 100's of usecs to do one read
transaction.