Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2784877rdb; Mon, 4 Dec 2023 07:29:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFgJAoTjEhsu6NvlmKIutyR9DtlNhxK9bQxvxD6xf/EuL16V3Mfs7LkYGzMY55BwvXzj4Vo X-Received: by 2002:a17:90b:33d2:b0:286:a4fc:9f51 with SMTP id lk18-20020a17090b33d200b00286a4fc9f51mr2265545pjb.29.1701703797554; Mon, 04 Dec 2023 07:29:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701703797; cv=none; d=google.com; s=arc-20160816; b=uTWEXG3D36cgE6px5qEH7AYQ+Ar4dcXg/Kp8yOV27+Q3DFEIhodUODb3H1RPkZ5aM8 wPzZQp7R+IfzDy2NjbZqywge8w14vgiipU/KyMzedhcnC90HGIrBmRULAlmcGtNXkda4 z6fKXvAgAigniM1jcBCxLIKu68DjTc8/CR1yHKcLsJegHLp/fAgtp8bQwkw/0tp6XgOu iPxI6AiaCNw86mEDnWiQfabC7CC/1xBkGmUExJUNoemAYw6Ygzicp1Nz0uqNNrtphYiK y0AC3t91+ePJaE+dkLBNBT39iyBNnBqmyMFu7iMxhi8nG7a5UDaPtoaKT3Xv9TuSpd8b cXGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=QivQ+lIz3OLn9ri9/hvM5XOt+5jrRpxQTGZ2TzwVn4g=; fh=xFxI2XYGntEpQuIphrWxY/vg56iJlWk+DFZJbeFPWno=; b=i3dWKH1BvEpgPtQRtgfeKj+muTPswUqcy/S3t8VdLDLxzV/kEM3cEmDRpg3BiRwBjQ 6fRzJwEGX9l2haMVw1zgUT65Sue2NtHtrgtB1LYDLfDBgwt+elnU2zRIP/+VuwoPXpDP Ys7pwS0oirZQhUggfbban8w5BzFAWk60XahsAzVM45E12Wuj+Jtxzqdik/x1Ylpjfz+O y1xsxovgfdOxobUVKqPIdBKtKjwl1yN6pd0LHPorDcXYhyXcQXHtYXEAr+uOH1SuhvVw 31PWnjkkjziOldlMoJ66gVEFYPqX5CS5F9lMqW9jbrSlIUFmmv+9kG7sSFyRYc6cJho2 c/6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id pm9-20020a17090b3c4900b00286b88b108bsi1532650pjb.174.2023.12.04.07.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 07:29:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E6BE78068232; Mon, 4 Dec 2023 07:29:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234631AbjLDP3d (ORCPT + 99 others); Mon, 4 Dec 2023 10:29:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234215AbjLDP3c (ORCPT ); Mon, 4 Dec 2023 10:29:32 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B1A8F0 for ; Mon, 4 Dec 2023 07:29:39 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rAAsl-0007Qm-Ar; Mon, 04 Dec 2023 16:29:15 +0100 Received: from [2a0a:edc0:2:b01:1d::c0] (helo=ptx.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAAsi-00DY6m-Q3; Mon, 04 Dec 2023 16:29:12 +0100 Received: from ore by ptx.whiteo.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1rAAsi-005FbI-Mx; Mon, 04 Dec 2023 16:29:12 +0100 Date: Mon, 4 Dec 2023 16:29:12 +0100 From: Oleksij Rempel To: Andrew Lunn Cc: Kory Maincent , "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 , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Dent Project Subject: Re: [PATCH net-next v2 4/8] net: ethtool: pse-pd: Expand pse commands with the PSE PoE interface Message-ID: <20231204152912.GF981228@pengutronix.de> References: <20231201-feature_poe-v2-0-56d8cac607fa@bootlin.com> <20231201-feature_poe-v2-4-56d8cac607fa@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 04 Dec 2023 07:29:55 -0800 (PST) On Sun, Dec 03, 2023 at 07:45:18PM +0100, Andrew Lunn wrote: > > @@ -143,6 +150,43 @@ ethnl_set_pse(struct ethnl_req_info *req_info, struct genl_info *info) > > return -EOPNOTSUPP; > > } > > > > + if (!tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL] && > > + !tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]) > > + return 0; > > -EINVAL? Is there a real use case for not passing either of them? > > > + > > + if (tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL] && > > + !(pse_get_types(phydev->psec) & PSE_PODL)) { > > + NL_SET_ERR_MSG_ATTR(info->extack, > > + tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL], > > + "setting PSE PoDL admin control not supported"); > > + return -EOPNOTSUPP; > > + } > > + if (tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL] && > > + !(pse_get_types(phydev->psec) & PSE_C33)) { > > + NL_SET_ERR_MSG_ATTR(info->extack, > > + tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL], > > + "setting PSE PoE admin control not supported"); > > This probably should be C33, not PoE? > > I guess it depends on what the user space tools are using. The same problem is in the documentation. Mixing different naming schemes is problematic. Even unmixed this "PoE" is not really suitable for most use cases. Expanding this abbreviations make it probably more clear: - PSE PoE - Power Source Equipment Power over Ethernet - C33 PSE - Clause 33 Power Source Equipment -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |