]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ice: print unsupported module message
authorPaul Greenwalt <paul.greenwalt@intel.com>
Wed, 9 Oct 2019 14:09:49 +0000 (07:09 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 7 Nov 2019 00:41:45 +0000 (16:41 -0800)
Print message to inform user if unsupported module is inserted, and
extend the topology / configuration detection.

Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
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_adminq_cmd.h
drivers/net/ethernet/intel/ice/ice_main.c

index 9b32aac6644474b96c33c18fe738176eafe5a0d5..622c666399fdcddca446456fd5f938a91934334e 100644 (file)
@@ -1044,6 +1044,10 @@ struct ice_aqc_get_link_status_data {
 #define ICE_AQ_LINK_TOPO_CONFLICT      BIT(0)
 #define ICE_AQ_LINK_MEDIA_CONFLICT     BIT(1)
 #define ICE_AQ_LINK_TOPO_CORRUPT       BIT(2)
+#define ICE_AQ_LINK_TOPO_UNREACH_PRT   BIT(4)
+#define ICE_AQ_LINK_TOPO_UNDRUTIL_PRT  BIT(5)
+#define ICE_AQ_LINK_TOPO_UNDRUTIL_MEDIA        BIT(6)
+#define ICE_AQ_LINK_TOPO_UNSUPP_MEDIA  BIT(7)
        u8 reserved1;
        u8 link_info;
 #define ICE_AQ_LINK_UP                 BIT(0)  /* Link Status */
index d061e9fd6f2cfc1b4a6a58755df943adb440af8f..7a90243198eb68bed3410e3e2eca2ea6da18d821 100644 (file)
@@ -637,8 +637,14 @@ static void ice_print_topo_conflict(struct ice_vsi *vsi)
        switch (vsi->port_info->phy.link_info.topo_media_conflict) {
        case ICE_AQ_LINK_TOPO_CONFLICT:
        case ICE_AQ_LINK_MEDIA_CONFLICT:
+       case ICE_AQ_LINK_TOPO_UNREACH_PRT:
+       case ICE_AQ_LINK_TOPO_UNDRUTIL_PRT:
+       case ICE_AQ_LINK_TOPO_UNDRUTIL_MEDIA:
                netdev_info(vsi->netdev, "Possible mis-configuration of the Ethernet port detected, please use the Intel(R) Ethernet Port Configuration Tool application to address the issue.\n");
                break;
+       case ICE_AQ_LINK_TOPO_UNSUPP_MEDIA:
+               netdev_info(vsi->netdev, "Rx/Tx is disabled on this device because an unsupported module type was detected. Refer to the Intel(R) Ethernet Adapters and Devices User Guide for a list of supported modules.\n");
+               break;
        default:
                break;
        }