From: Ian Campbell Subject: Re: [PATCH] linux-2.6.18/netfront: ethtool -i does not return info about xennet driver Date: Mon, 11 Oct 2010 10:30:15 +0100 Message-ID: <1286789415.2003.122.camel@zakaz.uk.xensource.com> References: <4CB2ED01020000780001C2A1@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4CB2ED01020000780001C2A1@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Jeremy Fitzhardinge Cc: ksrinivasan , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Mon, 2010-10-11 at 09:54 +0100, Jan Beulich wrote: > Signed-off-by: K. Y. Srinivasan > Signed-off-by: Jan Beulich Acked-by: Ian Campbell Upstream will shortly get this behaviour through a default drvinfo method (01414802054c382072b6cb9a1bdc6e243c74b2d5, queued for 2.6.37, I think). For consistency it would be useful to merge the following into xen.git's 2.6.32 branch as well which seems to have been missed and I forgot to repost. Ian. The following changes since commit 5473680bdedb7a62e641970119e6e9381a8d80f4: Dongxiao Xu (1): xen/netfront: Fix save/restore after enabled smart poll feature are available in the git repository at: git://xenbits.xen.org/people/ianc/linux-2.6.git for-jeremy/netfront Ian Campbell (1): xen: netfront: support the ethtool drvinfo hook. drivers/net/xen-netfront.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) --- >From 9a0429ca56f56d415a8b34a92dfa4e8737baf348 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 19 Aug 2010 09:42:22 +0100 Subject: [PATCH] xen: netfront: support the ethtool drvinfo hook. Causes "ethtool -i" to report something useful: # ethtool -i eth0 driver: xen-netfront version: firmware-version: bus-info: vif-0 Signed-off-by: Ian Campbell Cc: Jeremy Fitzhardinge --- drivers/net/xen-netfront.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index e894dd2..209bd06 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1747,8 +1747,17 @@ static int xennet_set_coalesce(struct net_device *netdev, return 0; } +static void xennet_get_drvinfo(struct net_device *dev, + struct ethtool_drvinfo *info) +{ + strcpy(info->driver, "xen-netfront"); + strcpy(info->bus_info, dev_name(dev->dev.parent)); +} + static struct ethtool_ops xennet_ethtool_ops = { + .get_drvinfo = xennet_get_drvinfo, + .set_tx_csum = ethtool_op_set_tx_csum, .set_sg = xennet_set_sg, .set_tso = xennet_set_tso, -- 1.5.6.5