net/ice/base: include more E810T adapters
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 16 Sep 2021 09:52:54 +0000 (17:52 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Tue, 21 Sep 2021 12:33:24 +0000 (14:33 +0200)
Expand the ice_is_e810t to include:
- Intel(R) Ethernet Network Adapter E810-C-Q2T
- Intel(R) Ethernet 25G 4P E810-XXV-st

Signed-off-by: Maciej Machnikowski <maciej.machnikowski@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
drivers/net/ice/base/ice_common.c
drivers/net/ice/base/ice_devids.h

index 6004c95..a780421 100644 (file)
@@ -208,8 +208,21 @@ bool ice_is_e810(struct ice_hw *hw)
  */
 bool ice_is_e810t(struct ice_hw *hw)
 {
-       return (hw->device_id == ICE_DEV_ID_E810C_SFP &&
-               hw->subsystem_device_id == ICE_SUBDEV_ID_E810T);
+       switch (hw->device_id) {
+       case ICE_DEV_ID_E810C_SFP:
+               if (hw->subsystem_device_id == ICE_SUBDEV_ID_E810T ||
+                   hw->subsystem_device_id == ICE_SUBDEV_ID_E810T2)
+                       return true;
+               break;
+       case ICE_DEV_ID_E810C_QSFP:
+               if (hw->subsystem_device_id == ICE_SUBDEV_ID_E810T2)
+                       return true;
+               break;
+       default:
+               break;
+       }
+
+       return false;
 }
 
 /**
index 18397f1..e52bb71 100644 (file)
@@ -23,6 +23,7 @@
 /* Intel(R) Ethernet Controller E810-C for SFP */
 #define ICE_DEV_ID_E810C_SFP           0x1593
 #define ICE_SUBDEV_ID_E810T            0x000E
+#define ICE_SUBDEV_ID_E810T2           0x000F
 /* Intel(R) Ethernet Controller E810-XXV for backplane */
 #define ICE_DEV_ID_E810_XXV_BACKPLANE  0x1599
 /* Intel(R) Ethernet Controller E810-XXV for QSFP */