[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YdQity1FDX0oNEN5@shell.armlinux.org.uk>
Date: Tue, 4 Jan 2022 10:34:31 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Harini Katakam <harinik@...inx.com>
Cc: Jakub Kicinski <kuba@...nel.org>,
Michal Simek <michals@...inx.com>,
Radhey Shyam Pandey <radheys@...inx.com>,
Sean Anderson <sean.anderson@...o.com>,
"David S. Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH CFT net-next 1/2] net: axienet: convert to phylink_pcs
On Tue, Jan 04, 2022 at 09:12:06AM +0000, Harini Katakam wrote:
> > -----Original Message-----
> > From: Russell King <linux@...linux.org.uk>
> > Sent: Tuesday, January 4, 2022 2:31 PM
> > To: Harini Katakam <harinik@...inx.com>
> > Cc: Jakub Kicinski <kuba@...nel.org>; Michal Simek <michals@...inx.com>;
> > Radhey Shyam Pandey <radheys@...inx.com>; Sean Anderson
> > <sean.anderson@...o.com>; David S. Miller <davem@...emloft.net>;
> > netdev <netdev@...r.kernel.org>; linux-arm-kernel@...ts.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@...inx.com> wrote:
> > > >
> > > > Hi Russell,
> > > >
> > > > On Fri, Dec 17, 2021 at 5:26 AM Russell King (Oracle)
> > > > <linux@...linux.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@...linux.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@...inx.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!
Powered by blists - more mailing lists