From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: "peppe.cavallaro@st.com" <peppe.cavallaro@st.com>
Cc: "manabian@gmail.com" <manabian@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"fabrice.gasnier@st.com" <fabrice.gasnier@st.com>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
"alexandre.torgue@gmail.com" <alexandre.torgue@gmail.com>,
"preid@electromag.com.au" <preid@electromag.com.au>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Vineet Gupta <Vineet.Gupta1@synopsys.com>,
"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: stmmac: GMAC_RGSMIIIS reports bogus values
Date: Wed, 25 Jan 2017 18:39:24 +0000 [thread overview]
Message-ID: <1485369563.7117.81.camel@synopsys.com> (raw)
In-Reply-To: <a1f114cc-6120-154c-a3f7-3e0389d38e36@st.com>
Hi Giuseppe,
On Mon, 2016-11-14 at 09:14 +0100, Giuseppe CAVALLARO wrote:
> Hello Alexey
>
> Sorry for my late reply. In that case, I think that the stmmac
> is using own RGMII/SGMII support (PCS) to dialog with the
> transceiver. I think, from the HW capability register
> this feature is present and the driver is using it as default.
Yep looks like that.
> I kindly ask you to verify if this is your setup or if you
> do not want to use it. In that case, it is likely we need to
> add some code in the driver.
Well GMAC's databook says:
--------------------------->8--------------------------
The DWC_gmac provides an IEEE 802.3z compliant 10-bit
Physical Coding Sublayer (PCS) interface that you can use
when the MAC is configured for the TBI, RTBI, or SGMII PHY
interface.
...
You can include the optional PCS module in the DWC_gmac by
selecting the TBI, RTBI, or SGMII interface in coreConsultant
during configuration.
--------------------------->8--------------------------
But we use RGMII for communication with the PHY.
And from the quote above I would conclude that for RGMII we should
have PCS excluded from GMAC.
I just sent email to GMAC developers here in Synopsys and
hopefully will get some clarifications from them soon.
Probably correct solution is as simple as:
--------------------------->8--------------------------
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index a276a32d57f2..f4b67dc7d530 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -803,13 +803,7 @@ static void stmmac_check_pcs_mode(struct stmmac_priv *priv)
int interface = priv->plat->interface;
if (priv->dma_cap.pcs) {
- if ((interface == PHY_INTERFACE_MODE_RGMII) ||
- (interface == PHY_INTERFACE_MODE_RGMII_ID) ||
- (interface == PHY_INTERFACE_MODE_RGMII_RXID) ||
- (interface == PHY_INTERFACE_MODE_RGMII_TXID)) {
- netdev_dbg(priv->dev, "PCS RGMII support enabled\n");
- priv->hw->pcs = STMMAC_PCS_RGMII;
- } else if (interface == PHY_INTERFACE_MODE_SGMII) {
+ if (interface == PHY_INTERFACE_MODE_SGMII) {
netdev_dbg(priv->dev, "PCS SGMII support enabled\n");
priv->hw->pcs = STMMAC_PCS_SGMII;
}
--------------------------->8--------------------------
> Also I wonder if, other version of the stmmac worked on this platform
> before.
It did work and still works. The only problem is we're getting
a lot of noise now about bogus link status change. That's because
this info is now in pr_info() compared to being previously in pr_debug().
-Alexey
next prev parent reply other threads:[~2017-01-25 18:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 16:17 stmmac: GMAC_RGSMIIIS reports bogus values Alexey Brodkin
2016-11-14 8:14 ` Giuseppe CAVALLARO
2017-01-25 18:39 ` Alexey Brodkin [this message]
2017-01-25 18:47 ` Vineet Gupta
2017-01-27 10:23 ` Alexey Brodkin
2017-01-31 9:55 ` Giuseppe CAVALLARO
2017-01-31 13:24 ` Alexey Brodkin
2017-01-31 13:46 ` Giuseppe CAVALLARO
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=1485369563.7117.81.camel@synopsys.com \
--to=alexey.brodkin@synopsys.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=alexandre.torgue@gmail.com \
--cc=davem@davemloft.net \
--cc=fabrice.gasnier@st.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=manabian@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=preid@electromag.com.au \
/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;
as well as URLs for NNTP newsgroup(s).