ice: Do not configure port with no media
authorTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 26 Jun 2019 09:20:17 +0000 (02:20 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 31 Jul 2019 17:23:04 +0000 (10:23 -0700)
commit6d5999467df03d1d7fd64ac761ffa20d00ce9e52
tree02dde5e8494e7b61b31db73287dd08e50bf60fa5
parent5c91ecfda5a8bfbc4697b35fe875cbc43a0f9100
ice: Do not configure port with no media

The firmware reports an error when trying to configure a port with no
media. Instead of always configuring the port, check for media before
attempting to configure it. In the absence of media, turn off link and
poll for media to become available before re-enabling link.

Move ice_force_phys_link_state() up to avoid forward declaration.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_main.c