public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik•org>
To: Ben Hutchings <bhutchings@solarflare•com>
Cc: David Miller <davem@davemloft•net>,
	netdev@vger•kernel.org, linux-net-drivers@solarflare•com
Subject: Re: [PATCH net-next-2.6] sfc: Implement ethtool register dump operation
Date: Mon, 21 Jun 2010 13:39:13 -0400	[thread overview]
Message-ID: <4C1FA3C1.4020006@garzik.org> (raw)
In-Reply-To: <1277125613.2100.9.camel@achroite.uk.solarflarecom.com>

On 06/21/2010 09:06 AM, Ben Hutchings wrote:
> Signed-off-by: Ben Hutchings<bhutchings@solarflare•com>
> ---
>   drivers/net/sfc/ethtool.c |   16 +++
>   drivers/net/sfc/io.h      |    7 +
>   drivers/net/sfc/nic.c     |  266 +++++++++++++++++++++++++++++++++++++++++++++
>   drivers/net/sfc/nic.h     |    3 +
>   4 files changed, 292 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
> index 22026bf..81b7f39 100644
> --- a/drivers/net/sfc/ethtool.c
> +++ b/drivers/net/sfc/ethtool.c
> @@ -242,6 +242,20 @@ static void efx_ethtool_get_drvinfo(struct net_device *net_dev,
>   	strlcpy(info->bus_info, pci_name(efx->pci_dev), sizeof(info->bus_info));
>   }
>
> +static int efx_ethtool_get_regs_len(struct net_device *net_dev)
> +{
> +	return efx_nic_get_regs_len(netdev_priv(net_dev));
> +}
> +
> +static void efx_ethtool_get_regs(struct net_device *net_dev,
> +				 struct ethtool_regs *regs, void *buf)
> +{
> +	struct efx_nic *efx = netdev_priv(net_dev);
> +
> +	regs->version = efx->type->revision;
> +	efx_nic_get_regs(efx, buf);

regs->version is really the version of hardware register dump exported 
to userspace.  You might want to hardcode this in the driver, to be 
changed when efx_nic_regs[] array changes, rather than tying 
regs->version directly to the SFC hardware architecture revision.

However, if that limitation is OK with you, ie. ethtool register dump 
code will change when h/w arch rev changes, then

	Acked-by: Jeff Garzik <jgarzik@redhat•com>

This is a ABI-related choice, so it deserves a bit of consideration.

Regards,

	Jeff





  reply	other threads:[~2010-06-21 17:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21 13:06 [PATCH net-next-2.6] sfc: Implement ethtool register dump operation Ben Hutchings
2010-06-21 17:39 ` Jeff Garzik [this message]
2010-06-21 17:52   ` Ben Hutchings
2010-06-21 18:08     ` 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=4C1FA3C1.4020006@garzik.org \
    --to=jeff@garzik$(echo .)org \
    --cc=bhutchings@solarflare$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=linux-net-drivers@solarflare$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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