]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: ethtool ixgbe_diag_test cleanup
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 8 Nov 2012 07:07:08 +0000 (07:07 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 23 Jan 2013 22:32:31 +0000 (14:32 -0800)
commit1aafd339c13a897952ded64bac29cc4bc8ac2770
tree1f1be84a65454cbc19e1a566c43f14308002b29b
parent83646a0425345b7e12fcef70ea6fb2d4a0fdd81a
ixgbe: ethtool ixgbe_diag_test cleanup

This patch cleans up the ethtool diagnostics test by ensuring that the tests
work properly regardless of what state the adapter was in. The SRIOV VF check is
done at the beginning, forgoing the link test. The if_running -> dev_close is
moved before the link test, as well as a call to enable the Tx laser. This
ensures that the link test will return valid results even when adapter was
previously down. Also, a call to disable the Tx laser is added if the device
was down before the start. This ensures consistent behavior of the Tx laser
before and after the diagnostic checks. The end result is consistent behavior
regardless of device state.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c