[PATCH v2 062/148] net/ice/base: re-number E810-T subdevice IDs to match upstream
Anatoly Burakov
anatoly.burakov at intel.com
Wed Jun 12 17:00:56 CEST 2024
From: Ian Stokes <ian.stokes at intel.com>
When upstreaming the E810-T support for Linux, during review it was pointed out
that the E810T subdevice IDs numbering was odd. The subdevice ID numbers seemed
to be arbitrary. The upstream driver re-numbered the subdevice ID values so that
they were in increasing order.
Align with upstream, and re-number the E810-T macros to match. Fix the
ice_is_e810t function to properly use the appropriate macros when determining if
a given card is E810-T.
Note that this has no functional difference as the only users of the
ICE_SUBDEV_ID_E810T macros is ice_is_e810t. The generated switch case statements
are identical before and after this change. You can confirm this using 'gcc -E'
on Linux.
Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
---
drivers/net/ice/base/ice_common.c | 18 +++++++++---------
drivers/net/ice/base/ice_devids.h | 10 +++++-----
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 75d02d39f5..0062bce2d7 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -236,16 +236,16 @@ bool ice_is_e810t(struct ice_hw *hw)
case ICE_SUBDEV_ID_E810T2:
case ICE_SUBDEV_ID_E810T3:
case ICE_SUBDEV_ID_E810T4:
- case ICE_SUBDEV_ID_E810T5:
- case ICE_SUBDEV_ID_E810T7:
- return true;
- }
- break;
- case ICE_DEV_ID_E810C_QSFP:
- switch (hw->subsystem_device_id) {
- case ICE_SUBDEV_ID_E810T2:
- case ICE_SUBDEV_ID_E810T5:
case ICE_SUBDEV_ID_E810T6:
+ case ICE_SUBDEV_ID_E810T7:
+ return true;
+ }
+ break;
+ case ICE_DEV_ID_E810C_QSFP:
+ switch (hw->subsystem_device_id) {
+ case ICE_SUBDEV_ID_E810T2:
+ case ICE_SUBDEV_ID_E810T3:
+ case ICE_SUBDEV_ID_E810T5:
return true;
}
break;
diff --git a/drivers/net/ice/base/ice_devids.h b/drivers/net/ice/base/ice_devids.h
index 49d642372a..33e6cc6ade 100644
--- a/drivers/net/ice/base/ice_devids.h
+++ b/drivers/net/ice/base/ice_devids.h
@@ -41,11 +41,11 @@
#define ICE_DEV_ID_E810C_SFP 0x1593
#define ICE_SUBDEV_ID_E810T 0x000E
#define ICE_SUBDEV_ID_E810T2 0x000F
-#define ICE_SUBDEV_ID_E810T3 0x02E9
-#define ICE_SUBDEV_ID_E810T4 0x02EA
-#define ICE_SUBDEV_ID_E810T5 0x0010
-#define ICE_SUBDEV_ID_E810T6 0x0012
-#define ICE_SUBDEV_ID_E810T7 0x0011
+#define ICE_SUBDEV_ID_E810T3 0x0010
+#define ICE_SUBDEV_ID_E810T4 0x0011
+#define ICE_SUBDEV_ID_E810T5 0x0012
+#define ICE_SUBDEV_ID_E810T6 0x02E9
+#define ICE_SUBDEV_ID_E810T7 0x02EA
/* Intel(R) Ethernet Controller E810-XXV for backplane */
#define ICE_DEV_ID_E810_XXV_BACKPLANE 0x1599
/* Intel(R) Ethernet Controller E810-XXV for QSFP */
--
2.43.0
More information about the dev
mailing list