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 9A13DC433EF for ; Tue, 4 Jan 2022 10:36:12 +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:In-Reply-To:MIME-Version:References: 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=Bh1ClguRftm4c2flVYGjOMkCe/xYL7XhMfuCiqKZaYk=; b=DKLuvMI2dFGuL1 r0RD1NYG57rNtl7GajUdRTfr0YwV2vSEaWN6N5mr+mYYJdouSmguye+E35lGSvZKLz8sfddnEZPl1 GOqWLoiUNt40HqNQRllP7PREtTcArS0lZ+4i8khZjWanv10RAzBf5dgdsMqzwF+Q6gR7QVfdHsVWd 355Fyg7NFwuvbAHA6HkRwux5DXUzsYYh5UpMS0F0O/1DGP10oaKmA8l5YgjIRqP2tc8LD6o9qslar uiJZmKLraWKs7whVm1nl+LhwW/SfGJ0ryFORaK6a+fyu5rSIKrmikbmDO5XuyQxGIo63aImObpFSu rO5LUhA9ya1otOyaI4Dg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4h9X-00BAIR-OV; Tue, 04 Jan 2022 10:34:51 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4h9R-00BAH8-V0 for linux-arm-kernel@lists.infradead.org; Tue, 04 Jan 2022 10:34:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cVEsL33VDlCXI6mXM0CqiL0PUax/E1YvZ8pPRTBh6jY=; b=07jjMVDYblOHkE8qvN1ebvddym TNj4MrRG83/veai3Y2nvGViDZr+7U1fLmZdGlqkCv0I/8WH7/XfrcqqwcMRanLhtqBrpYU3sNR8+s 6OHDsPhs5b46+eHh5S8mt+u9sZPk78OZJX1u6sqCnoLb6lWlg1kaT44cMxhRiApjj92UGDXC7D0cq u+1KyFbbhrWbEPL8BX/HVmKajudkpgfXvSh12CzQVreyKUwpuG9s68jsi/QaxlA1JwThIK/9PSDwc 442145qiGgDGQSHPtaC1r2dTGTInhTqTAvAt3Tg1fpPWgrTPsskOhbr+tsE3DS4vLwi0sF5xcBps2 Hi17G0Mw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56548) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n4h9G-0006rq-Ck; Tue, 04 Jan 2022 10:34:34 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1n4h9D-00079K-Hz; Tue, 04 Jan 2022 10:34:31 +0000 Date: Tue, 4 Jan 2022 10:34:31 +0000 From: "Russell King (Oracle)" To: Harini Katakam Cc: Jakub Kicinski , Michal Simek , Radhey Shyam Pandey , Sean Anderson , "David S. Miller" , netdev , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH CFT net-next 1/2] net: axienet: convert to phylink_pcs Message-ID: References: <20211216071513.6d1e0f55@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220104_023446_025726_9EF72319 X-CRM114-Status: GOOD ( 36.62 ) 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 On Tue, Jan 04, 2022 at 09:12:06AM +0000, Harini Katakam wrote: > > -----Original Message----- > > From: Russell King > > Sent: Tuesday, January 4, 2022 2:31 PM > > To: Harini Katakam > > Cc: Jakub Kicinski ; Michal Simek ; > > Radhey Shyam Pandey ; Sean Anderson > > ; David S. Miller ; > > netdev ; linux-arm-kernel@lists.infradead.org > > Subject: Re: [PATCH CFT net-next 1/2] net: axienet: convert to phylink_pcs > > > > On Tue, Jan 04, 2022 at 01:26:28PM +0530, Harini Katakam wrote: > > > On Fri, Dec 17, 2021 at 1:55 PM Harini Katakam wrote: > > > > > > > > Hi Russell, > > > > > > > > On Fri, Dec 17, 2021 at 5:26 AM Russell King (Oracle) > > > > wrote: > > > > > > > > > > On Thu, Dec 16, 2021 at 07:15:13AM -0800, Jakub Kicinski wrote: > > > > > > On Thu, 16 Dec 2021 12:48:45 +0000 Russell King (Oracle) wrote: > > > > > > > Convert axienet to use the phylink_pcs layer, resulting in it > > > > > > > no longer being a legacy driver. > > > > > > > > > > > > > > One oddity in this driver is that lp->switch_x_sgmii controls > > > > > > > whether we support switching between SGMII and 1000baseX. > > > > > > > However, when clear, this also blocks updating the 1000baseX > > > > > > > advertisement, which it probably should not be doing. > > > > > > > Nevertheless, this behaviour is preserved but a comment is added. > > > > > > > > > > > > > > Signed-off-by: Russell King (Oracle) > > > > > > > > > > > > > > > > > > > drivers/net/ethernet/xilinx/xilinx_axienet.h:479: warning: Function > > parameter or member 'pcs' not described in 'axienet_local' > > > > > > > > > > Fixed that and the sha1 issue you raised in patch 2. Since both > > > > > are "documentation" issues, I won't send out replacement patches > > > > > until I've heard they've been tested on hardware though. > > > > > > > > Thanks for the patches. > > > > Series looks good and we're testing at our end; will get back to you > > > > early next week. > > > > > > Thanks Russell. I've tested AXI Ethernet and it works fine. > > > > Happy new year! > > > > Thanks - can I use that as a tested-by please, and would you be happy for me > > to send the patches for merging this week? > > Sure, yes and yes. > Tested-by: Harini Katakam > > Happy new year to you too! Thanks. While adding the attributation, I was reminded of this comment in the commit message: One oddity in this driver is that lp->switch_x_sgmii controls whether we support switching between SGMII and 1000baseX. However, when clear, this also blocks updating the 1000baseX advertisement, which it probably should not be doing. Nevertheless, this behaviour is preserved but a comment is added. went back to look at that, and realised that this was not the case at all, so patch 1 introduces a behaviour that wasn't originally there. I'll post an update, but essentially the change to patch 1 is: diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index a556f0215049..fbe0de4bc8dd 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -1533,18 +1533,17 @@ static int axienet_pcs_config(struct phylink_pcs *pcs, unsigned int mode, struct axienet_local *lp = netdev_priv(ndev); int ret; - /* We don't support changing the advertisement in 1000base-X? --rmk */ - if (!lp->switch_x_sgmii) - return 0; - - ret = mdiobus_write(pcs_phy->bus, pcs_phy->addr, - XLNX_MII_STD_SELECT_REG, - interface == PHY_INTERFACE_MODE_SGMII ? - XLNX_MII_STD_SELECT_SGMII : 0); - if (ret < 0) { - netdev_warn(ndev, "Failed to switch PHY interface: %d\n", - ret); - return ret; + if (lp->switch_x_sgmii) { + ret = mdiobus_write(pcs_phy->bus, pcs_phy->addr, + XLNX_MII_STD_SELECT_REG, + interface == PHY_INTERFACE_MODE_SGMII ? + XLNX_MII_STD_SELECT_SGMII : 0); + if (ret < 0) { + netdev_warn(ndev, + "Failed to switch PHY interface: %d\n", + ret); + return ret; + } } ret = phylink_mii_c22_pcs_config(pcs_phy, mode, interface, advertising); and a corresponding change to patch 2 for the change in code formatting. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel