[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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@xxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

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 <ian.campbell@xxxxxxxxxx>
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@xxxxxxxxxx>
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.