diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-05-03 15:25:35 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-05-03 15:25:35 +0200 |
commit | d6d53cbc6b10d28646fb6184d1069f336ec76dc4 (patch) | |
tree | 1c844b3ce8bd430becbbb74875898b08d9f89bb5 /drivers/net/ixgbe/ixgbe_ethtool.c | |
parent | 0b5adf92ec793c665b0de63ac146d190a921c391 (diff) | |
parent | 6a740aa4f47b9f29bad5292cf51f008f3edad9b1 (diff) | |
download | blackbird-op-linux-d6d53cbc6b10d28646fb6184d1069f336ec76dc4.tar.gz blackbird-op-linux-d6d53cbc6b10d28646fb6184d1069f336ec76dc4.zip |
Merge branch 'hid-suspend' into picolcd
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_ethtool.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 7949a446e4c7..8f461d5cee77 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c @@ -29,6 +29,7 @@ #include <linux/types.h> #include <linux/module.h> +#include <linux/slab.h> #include <linux/pci.h> #include <linux/netdevice.h> #include <linux/ethtool.h> @@ -1853,6 +1854,26 @@ static void ixgbe_diag_test(struct net_device *netdev, if (ixgbe_link_test(adapter, &data[4])) eth_test->flags |= ETH_TEST_FL_FAILED; + if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) { + int i; + for (i = 0; i < adapter->num_vfs; i++) { + if (adapter->vfinfo[i].clear_to_send) { + netdev_warn(netdev, "%s", + "offline diagnostic is not " + "supported when VFs are " + "present\n"); + data[0] = 1; + data[1] = 1; + data[2] = 1; + data[3] = 1; + eth_test->flags |= ETH_TEST_FL_FAILED; + clear_bit(__IXGBE_TESTING, + &adapter->state); + goto skip_ol_tests; + } + } + } + if (if_running) /* indicate we're in test mode */ dev_close(netdev); @@ -1908,6 +1929,7 @@ skip_loopback: clear_bit(__IXGBE_TESTING, &adapter->state); } +skip_ol_tests: msleep_interruptible(4 * 1000); } |