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!