[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201026191948.GJ1551@shell.armlinux.org.uk>
Date: Mon, 26 Oct 2020 19:19:48 +0000
From: Russell King - ARM Linux admin <linux@...linux.org.uk>
To: Radhey Shyam Pandey <radheys@...inx.com>
Cc: Robert Hancock <robert.hancock@...ian.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
Michal Simek <michals@...inx.com>,
"andrew@...n.ch" <andrew@...n.ch>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2] net: axienet: Properly handle PCS/PMA PHY
for 1000BaseX mode
On Mon, Oct 26, 2020 at 06:57:00PM +0000, Radhey Shyam Pandey wrote:
> > + switch (state->interface) {
> > + case PHY_INTERFACE_MODE_NA:
> > + case PHY_INTERFACE_MODE_1000BASEX:
> > + case PHY_INTERFACE_MODE_SGMII:
> > + case PHY_INTERFACE_MODE_GMII:
> > + case PHY_INTERFACE_MODE_RGMII:
> > + case PHY_INTERFACE_MODE_RGMII_ID:
> > + case PHY_INTERFACE_MODE_RGMII_RXID:
> > + case PHY_INTERFACE_MODE_RGMII_TXID:
> > + phylink_set(mask, 1000baseX_Full);
> > + phylink_set(mask, 1000baseT_Full);
> > + if (state->interface == PHY_INTERFACE_MODE_1000BASEX)
> > + break;
>
> 100BaseT and 10BaseT can be set in PHY_INTERFACE_MODE_MII if we
> allow fallthrough here.
The above is actually correct (at the moment) since we don't yet support
rate adapting 1G PHYs.
> > + if (lp->phy_mode == PHY_INTERFACE_MODE_SGMII ||
> > + lp->phy_mode == PHY_INTERFACE_MODE_1000BASEX) {
> > + if (!lp->phy_node) {
> > + dev_err(&pdev->dev, "phy-handle required for
> > 1000BaseX/SGMII\n");
> > + ret = -EINVAL;
> > + goto free_netdev;
> > + }
> > + lp->pcs_phy = of_mdio_find_device(lp->phy_node);
> > + if (!lp->pcs_phy) {
> > + ret = -EPROBE_DEFER;
>
> Are we assuming the error is always EPROBE_DEFER?
of_mdio_find_device() returning NULL when the argument is non-NULL
just means it wasn't found - which isn't an "error".
--
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