ice: add 1G SGMII PHY type
authorPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Thu, 9 Jul 2020 16:16:14 +0000 (09:16 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 23 Jul 2020 22:36:14 +0000 (15:36 -0700)
commitc2b352262af4360e9a8aefc62bde9bd7012839a8
tree785c67a1e277b4e54809bcecd538267bafd00aca
parentc1eb3b6b68686d7a5dce7c6d795b7eedf6b0671c
ice: add 1G SGMII PHY type

There isn't a case for 1G SGMII in ice_get_media_type() so add
the handling for it.

Also handle the special case where some direct attach
cables may report that they support 1G SGMII, but
that is erroneous since SGMII is supposed to be a
backplane media type (between a MAC and a PHY). If
the driver doesn't handle this special case then a
user could see the 'Port' in ethtool change from
'Direct attach Copper' to 'Backplane' when they have
forced the speed to 1G, but the cable hasn't changed.

Lastly, change ice_aq_get_phy_caps() to save the
module_type info if the function was called with
ICE_AQC_REPORT_TOPO_CAP. This call uses the media
information to populate the module_type. If no
media is present then the values in module_type
will be 0.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
drivers/net/ethernet/intel/ice/ice_common.c