• Jacob Keller's avatar
    ixgbe: ethtool ixgbe_diag_test cleanup · dfcc4615
    Jacob Keller authored
    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: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    dfcc4615
ixgbe_ethtool.c 80.8 KB