From: "Russell King (Oracle)" <linux@armlinux.org.uk> To: Harini Katakam <harinik@xilinx.com> Cc: Jakub Kicinski <kuba@kernel.org>, Michal Simek <michals@xilinx.com>, Radhey Shyam Pandey <radheys@xilinx.com>, Sean Anderson <sean.anderson@seco.com>, "David S. Miller" <davem@davemloft.net>, netdev <netdev@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH CFT net-next 1/2] net: axienet: convert to phylink_pcs Date: Tue, 4 Jan 2022 10:34:31 +0000 [thread overview] Message-ID: <YdQity1FDX0oNEN5@shell.armlinux.org.uk> (raw) In-Reply-To: <BL3PR02MB8187165DAF278F65C8024567C94A9@BL3PR02MB8187.namprd02.prod.outlook.com> On Tue, Jan 04, 2022 at 09:12:06AM +0000, Harini Katakam wrote: > > -----Original Message----- > > From: Russell King <linux@armlinux.org.uk> > > Sent: Tuesday, January 4, 2022 2:31 PM > > To: Harini Katakam <harinik@xilinx.com> > > Cc: Jakub Kicinski <kuba@kernel.org>; Michal Simek <michals@xilinx.com>; > > Radhey Shyam Pandey <radheys@xilinx.com>; Sean Anderson > > <sean.anderson@seco.com>; David S. Miller <davem@davemloft.net>; > > netdev <netdev@vger.kernel.org>; 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 <harinik@xilinx.com> wrote: > > > > > > > > Hi Russell, > > > > > > > > On Fri, Dec 17, 2021 at 5:26 AM Russell King (Oracle) > > > > <linux@armlinux.org.uk> 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) > > > > > > > <rmk+kernel@armlinux.org.uk> > > > > > > > > > > > > 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 <harini.katakam@xilinx.com> > > 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!
WARNING: multiple messages have this Message-ID (diff)
From: "Russell King (Oracle)" <linux@armlinux.org.uk> To: Harini Katakam <harinik@xilinx.com> Cc: Jakub Kicinski <kuba@kernel.org>, Michal Simek <michals@xilinx.com>, Radhey Shyam Pandey <radheys@xilinx.com>, Sean Anderson <sean.anderson@seco.com>, "David S. Miller" <davem@davemloft.net>, netdev <netdev@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH CFT net-next 1/2] net: axienet: convert to phylink_pcs Date: Tue, 4 Jan 2022 10:34:31 +0000 [thread overview] Message-ID: <YdQity1FDX0oNEN5@shell.armlinux.org.uk> (raw) In-Reply-To: <BL3PR02MB8187165DAF278F65C8024567C94A9@BL3PR02MB8187.namprd02.prod.outlook.com> On Tue, Jan 04, 2022 at 09:12:06AM +0000, Harini Katakam wrote: > > -----Original Message----- > > From: Russell King <linux@armlinux.org.uk> > > Sent: Tuesday, January 4, 2022 2:31 PM > > To: Harini Katakam <harinik@xilinx.com> > > Cc: Jakub Kicinski <kuba@kernel.org>; Michal Simek <michals@xilinx.com>; > > Radhey Shyam Pandey <radheys@xilinx.com>; Sean Anderson > > <sean.anderson@seco.com>; David S. Miller <davem@davemloft.net>; > > netdev <netdev@vger.kernel.org>; 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 <harinik@xilinx.com> wrote: > > > > > > > > Hi Russell, > > > > > > > > On Fri, Dec 17, 2021 at 5:26 AM Russell King (Oracle) > > > > <linux@armlinux.org.uk> 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) > > > > > > > <rmk+kernel@armlinux.org.uk> > > > > > > > > > > > > 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 <harini.katakam@xilinx.com> > > 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
next prev parent reply other threads:[~2022-01-04 10:34 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-16 12:47 [PATCH CFT 0/2] net: axienet: modernise pcs implementation Russell King (Oracle) 2021-12-16 12:47 ` Russell King (Oracle) 2021-12-16 12:48 ` [PATCH CFT net-next 1/2] net: axienet: convert to phylink_pcs Russell King (Oracle) 2021-12-16 12:48 ` Russell King (Oracle) 2021-12-16 15:15 ` Jakub Kicinski 2021-12-16 15:15 ` Jakub Kicinski 2021-12-16 17:02 ` Russell King (Oracle) 2021-12-16 17:02 ` Russell King (Oracle) 2021-12-17 8:24 ` Radhey Shyam Pandey 2021-12-17 8:24 ` Radhey Shyam Pandey 2021-12-17 8:25 ` Harini Katakam 2021-12-17 8:25 ` Harini Katakam 2022-01-04 7:56 ` Harini Katakam 2022-01-04 7:56 ` Harini Katakam 2022-01-04 9:00 ` Russell King (Oracle) 2022-01-04 9:00 ` Russell King (Oracle) 2022-01-04 9:12 ` Harini Katakam 2022-01-04 9:12 ` Harini Katakam 2022-01-04 10:34 ` Russell King (Oracle) [this message] 2022-01-04 10:34 ` Russell King (Oracle) 2021-12-16 12:48 ` [PATCH CFT net-next 2/2] net: axienet: replace mdiobus_write() with mdiodev_write() Russell King (Oracle) 2021-12-16 12:48 ` Russell King (Oracle) 2021-12-16 15:14 ` Jakub Kicinski 2021-12-16 15:14 ` Jakub Kicinski 2022-01-04 10:44 ` [PATCH CFT v2 0/2] net: axienet: modernise pcs implementation Russell King (Oracle) 2022-01-04 10:44 ` Russell King (Oracle) 2022-01-04 10:46 ` [PATCH CFT v2 net-next 1/2] net: axienet: convert to phylink_pcs Russell King (Oracle) 2022-01-04 10:46 ` Russell King (Oracle) 2022-01-04 10:46 ` [PATCH CFT v2 net-next 2/2] net: axienet: replace mdiobus_write() with mdiodev_write() Russell King (Oracle) 2022-01-04 10:46 ` Russell King (Oracle)
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=YdQity1FDX0oNEN5@shell.armlinux.org.uk \ --to=linux@armlinux.org.uk \ --cc=davem@davemloft.net \ --cc=harinik@xilinx.com \ --cc=kuba@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=michals@xilinx.com \ --cc=netdev@vger.kernel.org \ --cc=radheys@xilinx.com \ --cc=sean.anderson@seco.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.