netdev
[Top] [All Lists]

Re: [PATCH 2.6.9-rc3-mm2] 3c59x: support more ethtool_ops

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: Re: [PATCH 2.6.9-rc3-mm2] 3c59x: support more ethtool_ops
From: Steffen Klassert <klassert@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 5 Oct 2004 18:02:47 +0200
Cc: akpm@xxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <4162ACED.10303@pobox.com>
Mail-followup-to: Jeff Garzik <jgarzik@xxxxxxxxx>, akpm@xxxxxxxx, netdev@xxxxxxxxxxx
References: <20041005134143.GA4829@gareth.mathematik.tu-chemnitz.de> <4162ACED.10303@pobox.com>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Tue, Oct 05, 2004 at 10:17:17AM -0400 or thereabouts, Jeff Garzik wrote:
> >+static u32 vortex_get_link(struct net_device *dev)
> >+{
> >+    struct vortex_private *vp = netdev_priv(dev);
> >+    long ioaddr = dev->base_addr;
> >+    EL3WINDOW(4);
> >+    return mii_link_ok(&vp->mii);
> >+}
> 
> 3c59x should properly use netif_carrier_{on,off}, at which point you can 
> eliminate vortex_get_link in favor of generic ethtool_op_get_link

I tried to use ethtool_op_get_link, but then ethtool reports 
Link detected: yes
It does not matter wether the cable is connected or not.

> >+
> >+static int vortex_set_settings(struct net_device *dev, struct ethtool_cmd 
> >*cmd)
> >+{
> >+    struct vortex_private *vp = netdev_priv(dev);
> >+    long ioaddr = dev->base_addr;
> >+    EL3WINDOW(4);
> >+    return mii_ethtool_sset(&vp->mii, cmd);
> >+}
> 
> I think that this and the other MII patch should do some amount of 
> locking, like the other drivers.

Unlike the other drivers, the 3c59x locks with spin_lock_bh inside 
the mdio _{read,write} functions. Thats why I did not used any locks here.

Steffen

<Prev in Thread] Current Thread [Next in Thread>