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 01CF9454EF; Tue, 25 Jun 2024 13:21:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CFB9142F0B; Tue, 25 Jun 2024 13:17:51 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 9832542D7D for ; Tue, 25 Jun 2024 13:16:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314211; x=1750850211; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FC7ezKALdufeuFQok1VlNxdGf3i40UUyeqa6W68CFuA=; b=HkYAy4TCZ9vrTXtTtR/J5DTxIJYxVeyDnqFBd8NZD2Sie7nIfjqNocfU btXUEhU6EoE+37JQhfgcN/FnWdJfFEzUbYIww4sr0enLMGYvctcNQXrWz fEJTamhAyPRQgZ5BNE3qudzcpIB1jLrgHOcPhXmqNVrxJTbFksM1H2Ide 4655HKFV/uCBEuMSBNu0y/hJuUZPmU50AcMUkToQbbaWQAEYXh+MDnntQ OIy+3BPJg5Z/K7DEmVUGSXoqpE7O34cqHBWRFG1ohkf/uzYIXk65aZOyk AeB9TlKYBKVS5epko63MVw6H2qt7PESA7e3GqOWtOONUcsZiGdg9KyLoy g==; X-CSE-ConnectionGUID: ABVE2aJPSxq1iVcSb7C2tA== X-CSE-MsgGUID: 27vQalFrSym1Ofi2PcYD3A== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080233" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080233" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2024 04:16:20 -0700 X-CSE-ConnectionGUID: 92TzoztoQ6iey4y0Xln1QQ== X-CSE-MsgGUID: qd/NGAA5RoCRetufF6/UYA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43719203" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:16:20 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Jacob Keller , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 049/129] net/ice/base: re-number E810-T subdevice IDs to match upstream Date: Tue, 25 Jun 2024 12:12:54 +0100 Message-ID: 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