From patchwork Thu Feb 8 13:08:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?K=C3=B6ry_Maincent?= X-Patchwork-Id: 198390 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp156253dyd; Thu, 8 Feb 2024 05:14:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXOKVmiefMe+hfml/x2iCpxHtMdahxiiRIWSWDqtBmexbG8JgP/FRB594LK4/mdhePN+khLLmX4t/ziDb7Sh2MUGLSFzQ== X-Google-Smtp-Source: AGHT+IFJwwpS5BqlDGQ5c9UMhfw9FeUbIXIsnbKQ53Atk6t/KvSN7qM3gyG25vrJ6G1NR6AhLSqw X-Received: by 2002:a05:620a:389d:b0:785:60bb:984 with SMTP id qp29-20020a05620a389d00b0078560bb0984mr8606510qkn.41.1707398046324; Thu, 08 Feb 2024 05:14:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707398046; cv=pass; d=google.com; s=arc-20160816; b=ioJoXydxKIk5uvL44Jt1SVEdTtJ9ALOxmXUe4xEjOWYIqy05JOiCVAqXx3Wsmb43Zx lAz4x9h9zG0t82YGKaU01qYNvMSa8CUzqRiwIfFAAuzg7t6+sofK1vZP2H4/xUek2hFp CuhURAcBZIB8rYpvga/QiDgppQMWdyAxrfzpS5hgcZYLNYAZIgoQKdf8ZRpwMIyeliP3 3staHkK2MjEBjALjl2MUtlnPsrNqjVeg2YaUqcrXDzHr2so+JtlZlyVF1Kj2BljlLdJ0 N3QSA9irbbEzafZoPrPwCtIwXMTfawX6lbDqSbt7pgUZf+m4Ztx2QD/7wwIS/lmus8z3 B8jA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=5nSY/2ac0py4lgUHMSREzXtFoOJOEw1JwX66XEmc9XM=; fh=TxdATRc5Vu/DmlMKorsWv7ou+6IBk37cBN5etiRJjLo=; b=m6MdIMkTynuVEQb/C30qnbLYh9Ub94676WTOxCgIolVfnI0OtSgYvmz+L+6+/LlZTG AeJIYKknTlFlwb/f1jriy32AExCVxQN7FF1s22VV6sV+R/p8DMy2KIU7Wa4CvV0iF8w9 FxAfzovVdy8GR4KgCJb4OXbboQbdcyy344nLq9YaN3Q3SY1FCMVZ0DMbm//B2lqcYpaE YU3CQ3QGBGkEeGBLYasgucBgB7IY1JVOdjL72vxhaJEY0hiKSpuEnmjlSnTtRaSxW9LH qTh78ggwec9J2bFzLsrcOxzdMfbMCqA6eEPBBnC9G3rM/pxLuFuF1Wjjo/KjKrRvmTQc iNEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Pyzljtv+; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-58116-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58116-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=2; AJvYcCXeo7en8xuZq1HSc0wupPViW8sx69JvkSdgh2VQQW+MJaYHlLChUzb4bOmVhSyyqOyF2v4pK4cEv22neIisD2ycuoGLow== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d2-20020a05620a136200b0078568a609cesi3011003qkl.697.2024.02.08.05.14.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 05:14:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58116-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Pyzljtv+; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-58116-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58116-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 88A351C21EC8 for ; Thu, 8 Feb 2024 13:13:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13CCD7FBA0; Thu, 8 Feb 2024 13:10:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Pyzljtv+" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 A4330763E7; Thu, 8 Feb 2024 13:10:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707397806; cv=none; b=rHskxM3Cb+VrQDerFU9u5hplvq4GNMjAzJQW2opSiauxsUeKjetIpmtTIRgVdGzAT47kJPkrCkFLUyEp3FHJAMLXviOw5olDmF2+Pa/woSBbBUFIrd30kKXNDnITFPHhoCMzq/ns/unbwlCzCl+ltDYR2z8UdFg+FRF142jW/5c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707397806; c=relaxed/simple; bh=xirP1iWxtUN76lRB4LuOX4kybJIAsxB9jvOxxXxyyZE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EMO1m7kekFrpb8ygHsv2lpvBAyC0M3XA5YPfudou7taPgzH6i26HVKBHaoOoKPp284wARt6nhecXW5H74SNZy6gi6JqNsHENSBwJ+Bv0yvGlVLhRPBDyBUSqW2LLIyN6tm1ZNcrpjrEs8y8zhtlef91CJbliXDiaGkphtcp8CIk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Pyzljtv+; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 3D0BD1BF212; Thu, 8 Feb 2024 13:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707397796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5nSY/2ac0py4lgUHMSREzXtFoOJOEw1JwX66XEmc9XM=; b=Pyzljtv+wIgRhfTRiwJSD9C4CQarW2a128biEjXrylyl31slt0a2W43zlMRaARsrSq8tLk a1Q5EOYiQbf/6Nb84bQ8dE7kNiKWK/78lLHQiY/D4Hti/V5vxOymfxPXKbIb8X4ENNgQ+h h7MTgtbm3s7kV/IrG/DaN+t8yp/oYNWKR5/Q4fgXdMjoBvhJYprlmrKnMYSfq9IH5aSwhm bB0E8ayqU1SgxTWuEjZCewqmb3gruQ4MBsyI9ugiY1KNTY4+k/ukkVBigcsxcvQ9ILL67o 5p3nv43O7a4C+Tdri6t4Rd7CePeVGXMQOo9ADZJjJzsYzQ0B1EMZa1xYd7Ltdw== From: Kory Maincent Date: Thu, 08 Feb 2024 14:08:40 +0100 Subject: [PATCH net-next v3 03/17] net: pse-pd: Rectify and adapt the naming of admin_cotrol member of struct pse_control_config Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240208-feature_poe-v3-3-531d2674469e@bootlin.com> References: <20240208-feature_poe-v3-0-531d2674469e@bootlin.com> In-Reply-To: <20240208-feature_poe-v3-0-531d2674469e@bootlin.com> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Oleksij Rempel , Mark Brown , Frank Rowand , Andrew Lunn , Heiner Kallweit , Russell King Cc: Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Dent Project , Kory Maincent X-Mailer: b4 0.12.4 X-GND-Sasl: kory.maincent@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790336614051290232 X-GMAIL-MSGID: 1790336614051290232 In commit 18ff0bcda6d1 ("ethtool: add interface to interact with Ethernet Power Equipment"), the 'pse_control_config' structure was introduced, housing a single member labeled 'admin_cotrol' responsible for maintaining the operational state of the PoDL PSE functions. A noticeable typographical error exists in the naming of this field ('cotrol' should be corrected to 'control'), which this commit aims to rectify. Furthermore, with upcoming extensions of this structure to encompass PoE functionalities, the field is being renamed to 'podl_admin_state' to distinctly indicate that this state is tailored specifically for PoDL." Sponsored-by: Dent Project Reviewed-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: Kory Maincent --- drivers/net/pse-pd/pse_regulator.c | 8 ++++---- include/linux/pse-pd/pse.h | 4 ++-- net/ethtool/pse-pd.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/pse-pd/pse_regulator.c b/drivers/net/pse-pd/pse_regulator.c index e2bf8306ca90..1dedf4de296e 100644 --- a/drivers/net/pse-pd/pse_regulator.c +++ b/drivers/net/pse-pd/pse_regulator.c @@ -31,10 +31,10 @@ pse_reg_ethtool_set_config(struct pse_controller_dev *pcdev, unsigned long id, struct pse_reg_priv *priv = to_pse_reg(pcdev); int ret; - if (priv->admin_state == config->admin_cotrol) + if (priv->admin_state == config->podl_admin_control) return 0; - switch (config->admin_cotrol) { + switch (config->podl_admin_control) { case ETHTOOL_PODL_PSE_ADMIN_STATE_ENABLED: ret = regulator_enable(priv->ps); break; @@ -43,14 +43,14 @@ pse_reg_ethtool_set_config(struct pse_controller_dev *pcdev, unsigned long id, break; default: dev_err(pcdev->dev, "Unknown admin state %i\n", - config->admin_cotrol); + config->podl_admin_control); ret = -ENOTSUPP; } if (ret) return ret; - priv->admin_state = config->admin_cotrol; + priv->admin_state = config->podl_admin_control; return 0; } diff --git a/include/linux/pse-pd/pse.h b/include/linux/pse-pd/pse.h index fb724c65c77b..199cf4ae3cf2 100644 --- a/include/linux/pse-pd/pse.h +++ b/include/linux/pse-pd/pse.h @@ -15,11 +15,11 @@ struct pse_controller_dev; /** * struct pse_control_config - PSE control/channel configuration. * - * @admin_cotrol: set PoDL PSE admin control as described in + * @podl_admin_control: set PoDL PSE admin control as described in * IEEE 802.3-2018 30.15.1.2.1 acPoDLPSEAdminControl */ struct pse_control_config { - enum ethtool_podl_pse_admin_state admin_cotrol; + enum ethtool_podl_pse_admin_state podl_admin_control; }; /** diff --git a/net/ethtool/pse-pd.c b/net/ethtool/pse-pd.c index cc478af77111..aef57a058f0d 100644 --- a/net/ethtool/pse-pd.c +++ b/net/ethtool/pse-pd.c @@ -130,7 +130,7 @@ ethnl_set_pse(struct ethnl_req_info *req_info, struct genl_info *info) struct phy_device *phydev; /* this values are already validated by the ethnl_pse_set_policy */ - config.admin_cotrol = nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]); + config.podl_admin_control = nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]); phydev = dev->phydev; if (!phydev) {