From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98816C35274 for ; Thu, 21 Dec 2023 17:33:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QQ6sD5JBnXxkZsl8sAubAwgpKTvH97w19/QkgzdLiJw=; b=vhJ1CebSQ1Eip7 ezbUzrev+0XDuQJowYYRwpYRocCEOFAzoPmnTLtX1fylkoqyyL0kSEU5687G+uXZgHwTKhyyV0VRv Zq1rc20T3gy1cGyr6j5F9ZmqsvhjgOCzaq50uffID8w2d7301wdPEhnqp88WyoTf/4Vtm/nlO/7VG n2V9SmDEFH7jsOek2Qq3oVz2JVV9MzS8sYpB/+lwpVAZUoZJ6hsfwunqGtmAAk4RXuxK3rFK4eIq8 l8c+38ju/a4lTyaGiFeZEk8O9EBvuEa3H0MDTrkaM1K8Y84wL1MUg0rU7QvSaFaKW4B/h3yK7T4KH AOKvEUyvlepb4qglKkGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rGMv8-003foH-27; Thu, 21 Dec 2023 17:33:18 +0000 Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rGMv3-003ffa-2I for linux-arm-kernel@lists.infradead.org; Thu, 21 Dec 2023 17:33:17 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 768841BF203; Thu, 21 Dec 2023 17:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1703179909; 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=0M+cuxQcvYewwyk4Th5VGeYl8kRK9tF6Qct+KX6cQ/4=; b=oKKM/O7T1r3p5geKv0JQS6h9R7CSVpqcu4nfFHVmAWrSSPd/n9e4grtwCFSsAntGJJC/XX hpJKGbmYH1W65BjgUIYe4Sv9CGa/HfyqeU9ym+N5wb2BizHli4nMh8osC3NEEjKRlpafCE vwowfV0rRkFbVzZoAwgYLbIP5f4FPGF5HF4Qbpw/Hr8PYG0E9Ow4y/diaTwqqNmhHtV91G KIIeTM/lfKR3qI35OAqpmw2L/GbOHMCAQ2+90iqmxgeXhMJZqULGKfgagjXzcBK83+qaQP NuzV8fCpgDcxBYXV55pBZ5vXR/e5NVNmbYAa5KKz8g7HYlm51bZjVOBNL7WncQ== Date: Thu, 21 Dec 2023 18:31:45 +0100 From: Maxime Chevallier To: Andrew Lunn Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?UTF-8?B?S8O2cnk=?= Maincent , Jesse Brandeburg , Jonathan Corbet , Marek =?UTF-8?B?QmVow7pu?= , Piergiorgio Beruto , Oleksij Rempel , =?UTF-8?B?Tmljb2zDsg==?= Veronese Subject: Re: [PATCH net-next v4 10/13] net: ethtool: pse-pd: Target the command to the requested PHY Message-ID: <20231221183145.31c167c0@device-28.home> In-Reply-To: <5f3a74fe-11e4-4c6e-a77d-f9c4f6fab156@lunn.ch> References: <20231215171237.1152563-1-maxime.chevallier@bootlin.com> <20231215171237.1152563-11-maxime.chevallier@bootlin.com> <5f3a74fe-11e4-4c6e-a77d-f9c4f6fab156@lunn.ch> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231221_093314_029890_D6CCE56D X-CRM114-Status: GOOD ( 24.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Andrew, Sorry I forgot to reply to that one... On Mon, 18 Dec 2023 10:58:30 +0100 Andrew Lunn wrote: > On Fri, Dec 15, 2023 at 06:12:32PM +0100, Maxime Chevallier wrote: > > PSE and PD configuration is a PHY-specific command. Instead of targeting > > the command towards dev->phydev, use the request to pick the targeted > > PHY device. > > > > Signed-off-by: Maxime Chevallier > > --- > > V4: No changes > > V3: No changes > > V2: New patch > > > > net/ethtool/pse-pd.c | 14 +++----------- > > 1 file changed, 3 insertions(+), 11 deletions(-) > > > > diff --git a/net/ethtool/pse-pd.c b/net/ethtool/pse-pd.c > > index cc478af77111..0d9cd9c87104 100644 > > --- a/net/ethtool/pse-pd.c > > +++ b/net/ethtool/pse-pd.c > > @@ -31,17 +31,10 @@ const struct nla_policy ethnl_pse_get_policy[ETHTOOL_A_PSE_HEADER + 1] = { > > [ETHTOOL_A_PSE_HEADER] = NLA_POLICY_NESTED(ethnl_header_policy), > > }; > > > > -static int pse_get_pse_attributes(struct net_device *dev, > > +static int pse_get_pse_attributes(struct phy_device *phydev, > > struct netlink_ext_ack *extack, > > struct pse_reply_data *data) > > { > > - struct phy_device *phydev = dev->phydev; > > - > > - if (!phydev) { > > - NL_SET_ERR_MSG(extack, "No PHY is attached"); > > - return -EOPNOTSUPP; > > - } > > - > > It would be good to say in the commit message why it is safe to remove > this. That's a good catch, this removal is wrong and will be put back in the next iteration. > > @@ -132,7 +124,7 @@ ethnl_set_pse(struct ethnl_req_info *req_info, struct genl_info *info) > > /* this values are already validated by the ethnl_pse_set_policy */ > > config.admin_cotrol = nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]); > > > > - phydev = dev->phydev; > > + phydev = req_info->phydev; > > if (!phydev) { > > NL_SET_ERR_MSG(info->extack, "No PHY is attached"); > > return -EOPNOTSUPP; > > So you removed one test, but this one stays? Thanks for the review, Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel