Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2303074rdb; Sun, 3 Dec 2023 10:46:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPQeFWuvV6mtKj2zt4S9jc5R1NTxZhT2C8Ttz709cG4Yg4HZINgH05AgJ5PTgSyirUQXj3 X-Received: by 2002:a05:6a00:1256:b0:6cb:a434:b58f with SMTP id u22-20020a056a00125600b006cba434b58fmr3585961pfi.33.1701629187121; Sun, 03 Dec 2023 10:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701629187; cv=none; d=google.com; s=arc-20160816; b=UykYjplMJRDuxPEM7z0QM//nzdCfDLZ2DXyJCmS4xKYxVxPRWhbT9c0lwEI40LcLBB 7mpW7PjP3Egh8OrUX0xv32NuhoQoUj/3DKQxnlETuagcFEZTJobTY/gLIlQCQndrtWl8 jX3aE84Qbtv13ygL/3ErOvqFhMLz2BbUEM8lblOSpnyUKlrtWyJojUGrZ9WTpkwoLC4t QXRhx4MeS+wrUuXBG/aiZIWybWCswGFZiN1hEm4VFrcV3lQAOmaisG+cPzGyIKKKiAMX zwzWyA50GrqtyXoqGV2MRXj7rUq6IczUcA/DABbOPvhfrwPjz3KKel480oWt70kR2yS5 gGXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3WBhCpBWX37N5cjsNg5ZZZtJtBisSM0dTRcPh0wLMNg=; fh=Pjt1u2jYzBNM6MqsUcYRdRQJ+6yRE69fI9ZqXp0NdkY=; b=meGjeKYkn8FlX8qDbN8rrT86+7As4SFsOMgNYsxP9n44GtHwkcOnbUQpL3fL4PSZha cvVyxRpMgUwkVppuXaKVjt3bjqxAg60qK9zhiHv7xSJFPRi/wJgiSTkbJSajQbIKgOyZ IvESqzH7ixiUBw9BhDM009rEqK6v9RaIucAqz3dyCOho/m8UlvmmM35OtCncf6RfazUj RjcnmHsJFClnaTCNZTpHTXQgSWATAGGzZ4QGoJ9WjtU25k+6bOpjd7P3fSUEufeO3x0k wKgonMmcxh3wxUOQTARZdMvVt0Me92euzGZBJeL1+bFF0QbVOPp43kAf6HSANWT82U0w JjUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=nNkCBi1d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id r5-20020a632045000000b005b95f5f8976si6746496pgm.634.2023.12.03.10.46.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 10:46:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=nNkCBi1d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 497B0807C655; Sun, 3 Dec 2023 10:45:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233840AbjLCSpW (ORCPT + 99 others); Sun, 3 Dec 2023 13:45:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjLCSpV (ORCPT ); Sun, 3 Dec 2023 13:45:21 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB764E8; Sun, 3 Dec 2023 10:45:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=3WBhCpBWX37N5cjsNg5ZZZtJtBisSM0dTRcPh0wLMNg=; b=nNkCBi1dmJQaCQreznDoIHAM7M to2LbakVF7BzVfPaFkiceQOIYt7M97/8rXDzKlfs7dlR4YGmWtuvhv/G6Vl6OHlGM3q0Tmhqf65W6 3Fbp8LMQ+Dqhq+gzxn9MVRhBhyaPCvQbh/JATVqV1WYZDvzWG4H8+CkVkdpYqzTIN/sw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r9rSw-001uSE-4o; Sun, 03 Dec 2023 19:45:18 +0100 Date: Sun, 3 Dec 2023 19:45:18 +0100 From: Andrew Lunn To: Kory Maincent Cc: "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 , 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: 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=us-ascii Content-Disposition: inline In-Reply-To: <20231201-feature_poe-v2-4-56d8cac607fa@bootlin.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Sun, 03 Dec 2023 10:45:36 -0800 (PST) > @@ -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. Andrew