From: Ian Campbell <ian.campbell@citrix.com>
To: netdev@vger.kernel.org, xen-devel@lists.xensource.com
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
"David S. Miller" <davem@davemloft.net>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook.
Date: Thu, 19 Aug 2010 10:27:50 +0100 [thread overview]
Message-ID: <1282210070-7745-2-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1282210055.3170.2283.camel@zakaz.uk.xensource.com>
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 788a9bc..4484929 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1630,8 +1630,17 @@ static void netback_changed(struct xenbus_device *dev,
}
}
+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 const 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
next prev parent reply other threads:[~2010-08-19 9:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-19 9:27 [GIT/PATCH 0/2] Minor fixes to xen-netfront Ian Campbell
2010-08-19 9:27 ` [PATCH 1/2] xen: use less generic names in netfront driver Ian Campbell
2010-08-23 4:44 ` David Miller
2010-08-19 9:27 ` Ian Campbell [this message]
2010-08-20 0:51 ` [PATCH 2/2] xen: netfront: support the ethtool drvinfo hook Ben Hutchings
2010-08-20 7:07 ` Ian Campbell
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=1282210070-7745-2-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=davem@davemloft.net \
--cc=jeremy@goop.org \
--cc=netdev@vger.kernel.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).