netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: akpm@osdl.org, netdev@oss.sgi.com
Subject: Re: [PATCH 2.6.9-rc3-mm2] 3c59x: support more ethtool_ops
Date: Tue, 5 Oct 2004 12:07:19 -0400	[thread overview]
Message-ID: <20041005160719.GA21225@havoc.gtf.org> (raw)
In-Reply-To: <20041005160247.GA5405@gareth.mathematik.tu-chemnitz.de>

On Tue, Oct 05, 2004 at 06:02:47PM +0200, Steffen Klassert wrote:
> 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.

Thus my comment "3c59x should properly use netif_carrier_{on,off}"  :)


> > >+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.

Insufficient.  3c59x uses register windows, and you do not lock between
setting the window and using the window.

	Jeff

      reply	other threads:[~2004-10-05 16:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 13:41 [PATCH 2.6.9-rc3-mm2] 3c59x: support more ethtool_ops Steffen Klassert
2004-10-05 14:17 ` Jeff Garzik
2004-10-05 16:02   ` Steffen Klassert
2004-10-05 16:07     ` Jeff Garzik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041005160719.GA21225@havoc.gtf.org \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).