From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 015444404F; Wed, 12 Jun 2024 17:14:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C01F42E80; Wed, 12 Jun 2024 17:05:17 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 8CA0642E56 for ; Wed, 12 Jun 2024 17:05:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204711; x=1749740711; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wJ8U38WeHOOtfFcww7EgdDyZNGQkseUW6UbvYNPfTyE=; b=QOcgtZUhlUy1hZO2D09EI7047/Hm3xuhef8CYSfIFc4dv7p2v4bU3R1U sqQOlHjo4CWeLUoW3o6aC3voMNx2y/1x+0e6sQWgjxfApZHq/ocP5BD+C 5DIXbUA4sYBeKUaaRqWCV9//s9OPsAlT3raTlgQ+xI+Dr7ZXGdiKG/rvx ZSZ0XKSs4jafnSeLSimVwKiokp4yF/j3XL1qbH6kRBTjB4MPBfOBOz0rk Juutqil5f2IG1TCXHIyARMD+NTrl8lLnibb++to0iEwrSbS0ftTZi//XE TW1UttoQ6qvC1tGGXYaGZu9rQVCfyWzRrjsyYtD+wewKObu5LhVrbN+DE A==; X-CSE-ConnectionGUID: ol5+X099SOC7fLprJq+RQg== X-CSE-MsgGUID: WJAuqC8iRL+VdAlz/mlVJA== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459580" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459580" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 08:05:01 -0700 X-CSE-ConnectionGUID: P8ft3PceQO+lfCgPIxYLWg== X-CSE-MsgGUID: lX2CgtoCSr2C+TUzh+HrBw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39925430" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:05:00 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Jacob Keller Subject: [PATCH v2 062/148] net/ice/base: re-number E810-T subdevice IDs to match upstream Date: Wed, 12 Jun 2024 16:00:56 +0100 Message-ID: <6284a348577c43f8d49e4987725d84e1ed84bf70.1718204528.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20240430154014.1026-1-ian.stokes@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Ian Stokes 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 Signed-off-by: Ian Stokes --- 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