]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ixgbe: Fix ethtool diag test for VT mode operation
authorGreg Rose <gregory.v.rose@intel.com>
Sat, 9 Jan 2010 02:27:05 +0000 (02:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Jan 2010 21:34:27 +0000 (13:34 -0800)
Skip MAC loopback test when the adapter is set to a VT mode such as SR-IOV
or VMDq

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>
drivers/net/ixgbe/ixgbe_ethtool.c

index 0bd49d3b9f6566285dcd83c00193a0eba5fa9819..a0107b5a28e7937f1b2e27fb49068543662b21dc 100644 (file)
@@ -1867,11 +1867,22 @@ static void ixgbe_diag_test(struct net_device *netdev,
                if (ixgbe_intr_test(adapter, &data[2]))
                        eth_test->flags |= ETH_TEST_FL_FAILED;
 
+               /* If SRIOV or VMDq is enabled then skip MAC
+                * loopback diagnostic. */
+               if (adapter->flags & (IXGBE_FLAG_SRIOV_ENABLED |
+                                     IXGBE_FLAG_VMDQ_ENABLED)) {
+                       DPRINTK(HW, INFO, "Skip MAC loopback diagnostic in VT "
+                               "mode\n");
+                       data[3] = 0;
+                       goto skip_loopback;
+               }
+
                ixgbe_reset(adapter);
                DPRINTK(HW, INFO, "loopback testing starting\n");
                if (ixgbe_loopback_test(adapter, &data[3]))
                        eth_test->flags |= ETH_TEST_FL_FAILED;
 
+skip_loopback:
                ixgbe_reset(adapter);
 
                clear_bit(__IXGBE_TESTING, &adapter->state);