Jan Beulich
2010-Oct-11 08:54 UTC
[Xen-devel] [PATCH] linux-2.6.18/netfront: ethtool -i does not return info about xennet driver
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com> Signed-off-by: Jan Beulich <jbeulich@novell.com> --- a/drivers/xen/netfront/netfront.c +++ b/drivers/xen/netfront/netfront.c @@ -1755,6 +1755,13 @@ static void xennet_set_features(struct n xennet_set_tso(dev, 1); } +static void netfront_get_drvinfo(struct net_device *dev, + struct ethtool_drvinfo *info) +{ + strcpy(info->driver, "netfront"); + strcpy(info->bus_info, dev_name(dev->dev.parent)); +} + static int network_connect(struct net_device *dev) { struct netfront_info *np = netdev_priv(dev); @@ -1863,6 +1870,7 @@ static void netif_uninit(struct net_devi static struct ethtool_ops network_ethtool_ops { + .get_drvinfo = netfront_get_drvinfo, .get_tx_csum = ethtool_op_get_tx_csum, .set_tx_csum = ethtool_op_set_tx_csum, .get_sg = ethtool_op_get_sg, _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2010-Oct-11 09:30 UTC
Re: [Xen-devel] [PATCH] linux-2.6.18/netfront: ethtool -i does not return info about xennet driver
On Mon, 2010-10-11 at 09:54 +0100, Jan Beulich wrote:> Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com> > Signed-off-by: Jan Beulich <jbeulich@novell.com>Acked-by: Ian Campbell <ian.campbell@citrix.com> 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 2001From: Ian Campbell <ian.campbell@citrix.com> 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 <ian.campbell@citrix.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> --- 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel