From patchwork Wed Apr 26 18:50:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Greenwalt X-Patchwork-Id: 1774232 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=Wnvia/Xs; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q67R00SQ9z23vH for ; Thu, 27 Apr 2023 04:57:30 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id D6E0883C21; Wed, 26 Apr 2023 18:57:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D6E0883C21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1682535447; bh=ysVR89GvkwA7F1VGJjNIQRRpPumYEUEVskzYCZoJJo8=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Wnvia/XsLcvnyMLriLE33Ugg+XWwOrS2gyjjwknRCkhBUR5LlNoZkl7jAbdDpeDjr 8oJHgaetSKdWMnBeA6gU2K+Oh8Ji0o+W00Av77g76O8FKMN0PyPvPhg14GAm31E5C0 D8JoY28XbOt1bmmhy3qTnh8I/CH+4CJRLa82cAVFtx9SaE1iD9sUxuGB89gA7SHZQE qATzkoUXoQnoAFMC/p9IAgru2I0pnL17CLlPcSnG8Ay11Mg+GpzRDMvovjWnLY7lK1 +TsSHm1Rh8XUVZtC7QMt6P06BXiYrfCV4v2QkQ6Gh+n60WO6pnN8hMYB4ju2MJiiqR 4ks255kw5/PAQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MLvC_cN6p1r8; Wed, 26 Apr 2023 18:57:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 053F383C25; Wed, 26 Apr 2023 18:57:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 053F383C25 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 22B5C1BF5AE for ; Wed, 26 Apr 2023 18:57:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 0363D61525 for ; Wed, 26 Apr 2023 18:57:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0363D61525 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7zovAd5Fudgr for ; Wed, 26 Apr 2023 18:57:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9D0C7607E1 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by smtp3.osuosl.org (Postfix) with ESMTPS id 9D0C7607E1 for ; Wed, 26 Apr 2023 18:57:24 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="327529661" X-IronPort-AV: E=Sophos;i="5.99,228,1677571200"; d="scan'208";a="327529661" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2023 11:57:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="868396226" X-IronPort-AV: E=Sophos;i="5.99,228,1677571200"; d="scan'208";a="868396226" Received: from unknown (HELO localhost.jf.intel.com) ([10.166.244.168]) by orsmga005.jf.intel.com with ESMTP; 26 Apr 2023 11:57:07 -0700 From: Paul Greenwalt To: intel-wired-lan@lists.osuosl.org Date: Wed, 26 Apr 2023 11:50:45 -0700 Message-Id: <20230426185047.725910-1-paul.greenwalt@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682535444; x=1714071444; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EIceTSH7I7dlyL93I7Q9+ocMQAgLT0Mb0Lz6KJFERxg=; b=N9F0GLlyH8HVfu2g0Ckm7o+Xr6F1OYunRW6jd3QDCXiaSBu3fcSA9+h7 5m7UtHGxyYyEKhB4j0+sX7cVaoi8N509JukwhtOUk7USeKsfZYy/nN14A x1PhAmcCXEqviQ73dLgB+/lZefEe9rihpeuPCBcTYrTVyHSrg2mMOdLUj 2m9AdgXciMBgj9+ZEo4KdG6lDAHz2CcPam4inaRv6/dQ5UfAHyQKaCeE7 OzHzTfv0oc70tdgxJEf7u0yFEaEjvxtSgy/IS4ikU18QYeT1YVbC3HVnL yLVY32gkD9uFCi+JHL2DkFJVmegMOXaBcOmVsCsvYmtf9xByf9RGOguVP A==; X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=N9F0GLly Subject: [Intel-wired-lan] [PATCH net 1/3] ice: update ICE_PHY_TYPE_HIGH_MAX_INDEX X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" ICE_PHY_TYPE_HIGH_MAX_INDEX should be the maximum index value and not the length/number of ICE_PHY_TYPE_HIGH. This is not an issue because this define is only used when calling ice_get_link_speed_based_on_phy_type(), which will return ICE_AQ_LINK_SPEED_UNKNOWN for any invalid index. The caller of ice_get_link_speed_based_on_phy_type(), ice_update_phy_type() checks that the return value is a valid link speed before using it and ICE_AQ_LINK_SPEED_UNKNOWN is not. However, update the define to reflect the correct value. Signed-off-by: Paul Greenwalt Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) --- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h index 740236b3f0fc..8a624cef0eb0 100644 --- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h @@ -1105,7 +1105,7 @@ struct ice_aqc_get_phy_caps { #define ICE_PHY_TYPE_HIGH_100G_CAUI2 BIT_ULL(2) #define ICE_PHY_TYPE_HIGH_100G_AUI2_AOC_ACC BIT_ULL(3) #define ICE_PHY_TYPE_HIGH_100G_AUI2 BIT_ULL(4) -#define ICE_PHY_TYPE_HIGH_MAX_INDEX 5 +#define ICE_PHY_TYPE_HIGH_MAX_INDEX 4 struct ice_aqc_get_phy_caps_data { __le64 phy_type_low; /* Use values from ICE_PHY_TYPE_LOW_* */