aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2010-03-25 13:06:48 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-27 11:33:21 -0400
commite7d481a6f3c13041446b7bb8f98ab861460076a3 (patch)
tree5fd3e1d1d08ce6637df08937b4ad940322845b9e /drivers
parente017b60316468f21a63bdd4affefaf81a7f988fd (diff)
ixgbe: Do not run all Diagnostic offline tests when VFs are active
When running the offline diagnostic tests check to see if any VFs are online. If so then only run the link test. This is necessary because the VFs running in guest VMs aren't aware of when the PF is taken offline for a diagnostic test. Also put a message to the system log telling the system administrator to take the VFs offline manually if (s)he wants to run a full diagnostic. Return 1 on each of the tests not run to alert the user of the condition. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 7949a446e4c7..1959ef76c962 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -1853,6 +1853,26 @@ static void ixgbe_diag_test(struct net_device *netdev,
1853 if (ixgbe_link_test(adapter, &data[4])) 1853 if (ixgbe_link_test(adapter, &data[4]))
1854 eth_test->flags |= ETH_TEST_FL_FAILED; 1854 eth_test->flags |= ETH_TEST_FL_FAILED;
1855 1855
1856 if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) {
1857 int i;
1858 for (i = 0; i < adapter->num_vfs; i++) {
1859 if (adapter->vfinfo[i].clear_to_send) {
1860 netdev_warn(netdev, "%s",
1861 "offline diagnostic is not "
1862 "supported when VFs are "
1863 "present\n");
1864 data[0] = 1;
1865 data[1] = 1;
1866 data[2] = 1;
1867 data[3] = 1;
1868 eth_test->flags |= ETH_TEST_FL_FAILED;
1869 clear_bit(__IXGBE_TESTING,
1870 &adapter->state);
1871 goto skip_ol_tests;
1872 }
1873 }
1874 }
1875
1856 if (if_running) 1876 if (if_running)
1857 /* indicate we're in test mode */ 1877 /* indicate we're in test mode */
1858 dev_close(netdev); 1878 dev_close(netdev);
@@ -1908,6 +1928,7 @@ skip_loopback:
1908 1928
1909 clear_bit(__IXGBE_TESTING, &adapter->state); 1929 clear_bit(__IXGBE_TESTING, &adapter->state);
1910 } 1930 }
1931skip_ol_tests:
1911 msleep_interruptible(4 * 1000); 1932 msleep_interruptible(4 * 1000);
1912} 1933}
1913 1934