Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 2693

kernel-2.6.18-238.el5.src.rpm

From: Andy Gospodarek <gospo@redhat.com>
Date: Thu, 2 Sep 2010 03:34:28 -0400
Subject: [net] igb: actually support self_test ethtool command
Message-id: <1283398468-18278-1-git-send-email-gospo@redhat.com>
Patchwork-id: 28010
O-Subject: [PATCH RHEL5.6 2/2] igb: actually support self_test ethtool command
Bugzilla: 593862
RH-Acked-by: Stefan Assmann <sassmann@redhat.com>
RH-Acked-by: Dean Nelson <dnelson@redhat.com>
RH-Acked-by: David S. Miller <davem@redhat.com>

During the initial backport process, it appears the following bits were
never added.  Adding them allows ethtool self-test operations to run.

This will resolve RHBZ 593862.

diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index b5a033b..a65af2a 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -1716,6 +1716,11 @@ static int igb_link_test(struct igb_adapter *adapter, u64 *data)
 	return *data;
 }
 
+static int igb_diag_test_count(struct net_device *netdev)
+{
+	return IGB_TEST_LEN;
+}
+
 static void igb_diag_test(struct net_device *netdev,
 			  struct ethtool_test *eth_test, u64 *data)
 {
@@ -2118,6 +2123,7 @@ static struct ethtool_ops igb_ethtool_ops = {
 	.get_tso                = ethtool_op_get_tso,
 	.set_tso                = igb_set_tso,
 	.self_test              = igb_diag_test,
+	.self_test_count        = igb_diag_test_count,
 	.get_strings            = igb_get_strings,
 	.phys_id                = igb_phys_id,
 	.get_stats_count        = igb_get_stats_count,