From patchwork Mon Oct 2 14:44:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Chmielewski X-Patchwork-Id: 13406306 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 743D3CA5D for ; Mon, 2 Oct 2023 14:48:59 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EA2B94 for ; Mon, 2 Oct 2023 07:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696258137; x=1727794137; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eeRf5qPIDPPBmhfk8948B4Bq6fVtpeRM4MyhqN7ROiA=; b=IMkZFKawN6MIEmXRRNoik10Ts6zeViL3b/B5sU3oEoQ7B+S2dyPhnSJY U9YKt287Svt2ZuhPJc8L+kR3VPUsJp5Me4DPAaL+C4e/LtoMn4+Zn809B lriWt4dIwAatqBetEHS3IEqNjLRkO6pIWlOIKvbr3vyDlQwRJPTGgxsEE qB7oqgJctA75UYlleQ9jlQzU4wqCwa2zOsyhOdFtc6iMw6gtMVyZa8tUQ utpK4+Ky05SaRD2ctJuZCtihEeB2xbszbc9fdlzO+/reAk81PWNBXHhEr VhQpTupuu3CngD1g/yLEi7MIQ5qEWuwN0UgsDFQQic8/RozntNp4CWMJL w==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="385476065" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="385476065" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 07:48:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="874374982" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="874374982" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by orsmga004.jf.intel.com with ESMTP; 02 Oct 2023 07:48:52 -0700 Received: from baltimore.igk.intel.com (baltimore.igk.intel.com [10.102.21.1]) by irvmail002.ir.intel.com (Postfix) with ESMTP id EC7F843C30; Mon, 2 Oct 2023 15:48:50 +0100 (IST) From: Pawel Chmielewski To: netdev@vger.kernel.org Cc: intel-wired-lan@lists.osuosl.org, andrew@lunn.ch, aelior@marvell.com, manishc@marvell.com, horms@kernel.org, vladimir.oltean@nxp.com, pabeni@redhat.com, davem@davemloft.net, edumazet@google.com, jdamato@fastly.com, d-tatianin@yandex-team.ru, kuba@kernel.org, Pawel Chmielewski Subject: [PATCH net-next v3 0/2] ethtool: Add link mode maps for forced speeds Date: Mon, 2 Oct 2023 16:44:10 +0200 Message-Id: <20231002144412.1755194-1-pawel.chmielewski@intel.com> X-Mailer: git-send-email 2.37.3 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org The following patch set was initially a part of [1]. As the purpose of the original series was to add the support of the new hardware to the intel ice driver, the refactoring of advertised link modes mapping was extracted to a new set. The patch set adds a common mechanism for mapping Ethtool forced speeds with Ethtool supported link modes, which can be used in drivers code. [1] https://lore.kernel.org/netdev/20230823180633.2450617-1-pawel.chmielewski@intel.com Changelog: v2->v3: Fixed whitespaces, added missing line at end of file v1->v2: Fixed formatting, typo, moved declaration of iterator to loop line. Paul Greenwalt (1): ethtool: Add forced speed to supported link modes maps Pawel Chmielewski (1): ice: Refactor finding advertised link speed drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_ethtool.c | 201 ++++++++++++------ drivers/net/ethernet/intel/ice/ice_main.c | 2 + .../net/ethernet/qlogic/qede/qede_ethtool.c | 24 +-- include/linux/ethtool.h | 20 ++ net/ethtool/ioctl.c | 15 ++ 6 files changed, 178 insertions(+), 85 deletions(-)