netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>, akpm@osdl.org
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH 2.6.9-rc3-mm2] 3c59x: support more ethtool_ops
Date: Tue, 05 Oct 2004 10:17:17 -0400	[thread overview]
Message-ID: <4162ACED.10303@pobox.com> (raw)
In-Reply-To: <20041005134143.GA4829@gareth.mathematik.tu-chemnitz.de>

Steffen Klassert wrote:
> +static int vortex_nway_reset(struct net_device *dev)
> +{
> +	struct vortex_private *vp = netdev_priv(dev);
> +	long ioaddr = dev->base_addr;
> +	EL3WINDOW(4);
> +	return mii_nway_restart(&vp->mii);
> +}
> +
> +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


> +static int vortex_get_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_gset(&vp->mii, cmd);
> +}
> +
> +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.

	Jeff

  reply	other threads:[~2004-10-05 14:17 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 [this message]
2004-10-05 16:02   ` Steffen Klassert
2004-10-05 16:07     ` Jeff Garzik

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=4162ACED.10303@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=klassert@mathematik.tu-chemnitz.de \
    --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).