diff options
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 @@ | |||
29 | 29 | ||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
33 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
34 | #include <linux/ethtool.h> | 35 | #include <linux/ethtool.h> |
@@ -1853,6 +1854,26 @@ static void ixgbe_diag_test(struct net_device *netdev, | |||
1853 | if (ixgbe_link_test(adapter, &data[4])) | 1854 | if (ixgbe_link_test(adapter, &data[4])) |
1854 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1855 | eth_test->flags |= ETH_TEST_FL_FAILED; |
1855 | 1856 | ||
1857 | if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) { | ||
1858 | int i; | ||
1859 | for (i = 0; i < adapter->num_vfs; i++) { | ||
1860 | if (adapter->vfinfo[i].clear_to_send) { | ||
1861 | netdev_warn(netdev, "%s", | ||
1862 | "offline diagnostic is not " | ||
1863 | "supported when VFs are " | ||
1864 | "present\n"); | ||
1865 | data[0] = 1; | ||
1866 | data[1] = 1; | ||
1867 | data[2] = 1; | ||
1868 | data[3] = 1; | ||
1869 | eth_test->flags |= ETH_TEST_FL_FAILED; | ||
1870 | clear_bit(__IXGBE_TESTING, | ||
1871 | &adapter->state); | ||
1872 | goto skip_ol_tests; | ||
1873 | } | ||
1874 | } | ||
1875 | } | ||
1876 | |||
1856 | if (if_running) | 1877 | if (if_running) |
1857 | /* indicate we're in test mode */ | 1878 | /* indicate we're in test mode */ |
1858 | dev_close(netdev); | 1879 | dev_close(netdev); |
@@ -1908,6 +1929,7 @@ skip_loopback: | |||
1908 | 1929 | ||
1909 | clear_bit(__IXGBE_TESTING, &adapter->state); | 1930 | clear_bit(__IXGBE_TESTING, &adapter->state); |
1910 | } | 1931 | } |
1932 | skip_ol_tests: | ||
1911 | msleep_interruptible(4 * 1000); | 1933 | msleep_interruptible(4 * 1000); |
1912 | } | 1934 | } |
1913 | 1935 | ||