Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdbec4b8 authored by Greg Rose's avatar Greg Rose Committed by David S. Miller
Browse files

ixgbe: Fix ethtool diag test for VT mode operation



Skip MAC loopback test when the adapter is set to a VT mode such as SR-IOV
or VMDq

Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1cdd1ec8
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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);