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 2C66F45500; Wed, 26 Jun 2024 13:58:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A8474336C; Wed, 26 Jun 2024 13:55:31 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id E148642E95 for ; Wed, 26 Jun 2024 13:43:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719402231; x=1750938231; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FC7ezKALdufeuFQok1VlNxdGf3i40UUyeqa6W68CFuA=; b=WlB2dkMbnK9G9ekUOKm6z4CqPxlC8TnPVFlTmgGK2CSOZz5ZOl8DSpEt r4w2wb2mLFrxKIgdadN1yl0pn6XFl+USeokwA/MqkjM+Dydu2zdvQksbj RpScpqxHEZGcmfBG9L5zxjNVj3wAC7x/ee7oE00mclerWjH9fcN3VUCM9 hvQ7kf/Nj9BPHDmUp7J8TT3p+JLEmTD3HDbuTRtwfy0fbzKME0dMopyuq cIMB2BVWh2ICIIYfOK2suuLyQiUwHzZOjVICj1alWSxyGiqB+tjsS5+L7 NHRs3u8q/z1vH6C5RDDRIKmXYVUGytvm0v7cUOl3Pqq/APF4ta4R1Z6EI Q==; X-CSE-ConnectionGUID: rUIM2EEsTmShG2NoyHHrzA== X-CSE-MsgGUID: cqAzDLUIRL619E/ER39TgA== X-IronPort-AV: E=McAfee;i="6700,10204,11114"; a="38979374" X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="38979374" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2024 04:43:50 -0700 X-CSE-ConnectionGUID: rzNlwJiETrW/+kbyqzZypA== X-CSE-MsgGUID: KjcuJ75xS624hxbEB12cNg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="43873650" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa010.jf.intel.com with ESMTP; 26 Jun 2024 04:43:49 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Jacob Keller , ian.stokes@intel.com, bruce.richardson@intel.com Subject: [PATCH v4 029/103] net/ice/base: re-number E810-T subdevice IDs to match upstream Date: Wed, 26 Jun 2024 12:41:17 +0100 Message-ID: <558058dbdfad3ced654f47039bffd48a5c3b425e.1719401847.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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: Jacob Keller 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 5a34a0e86e..e1476d6794 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