WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] linux-2.6.18/netfront: ethtool -i does not retur

To: Jan Beulich <JBeulich@xxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] linux-2.6.18/netfront: ethtool -i does not return info about xennet driver
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Mon, 11 Oct 2010 10:30:15 +0100
Cc: ksrinivasan <ksrinivasan@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 11 Oct 2010 02:31:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4CB2ED01020000780001C2A1@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <4CB2ED01020000780001C2A1@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>