From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Radhey Shyam Pandey <radheys@xilinx.com>
Cc: Robert Hancock <robert.hancock@calian.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"kuba@kernel.org" <kuba@kernel.org>,
Michal Simek <michals@xilinx.com>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v2] net: axienet: Properly handle PCS/PMA PHY for 1000BaseX mode
Date: Mon, 26 Oct 2020 19:19:48 +0000 [thread overview]
Message-ID: <20201026191948.GJ1551@shell.armlinux.org.uk> (raw)
In-Reply-To: <BYAPR02MB56382BA3CB100008FC02B02BC7190@BYAPR02MB5638.namprd02.prod.outlook.com>
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!
next prev parent reply other threads:[~2020-10-26 19:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 17:55 [PATCH net-next v2] net: axienet: Properly handle PCS/PMA PHY for 1000BaseX mode Robert Hancock
2020-10-26 18:57 ` Radhey Shyam Pandey
2020-10-26 19:19 ` Russell King - ARM Linux admin [this message]
2020-10-26 19:44 ` Robert Hancock
2020-10-27 14:25 ` Radhey Shyam Pandey
2020-10-27 15:07 ` Robert Hancock
2020-10-27 15:14 ` Radhey Shyam Pandey
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=20201026191948.GJ1551@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=michals@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=radheys@xilinx.com \
--cc=robert.hancock@calian.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox