All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: Andrew Lunn <andrew@lunn.ch>, Jose Abreu <Jose.Abreu@synopsys.com>
Cc: <netdev@vger.kernel.org>, "David S. Miller" <davem@davemloft.net>,
	"Joao Pinto" <Joao.Pinto@synopsys.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>
Subject: Re: [PATCH net-next 7/9] net: stmmac: Integrate XGMAC into main driver flow
Date: Thu, 2 Aug 2018 09:26:28 +0100	[thread overview]
Message-ID: <6dae65da-699f-77c9-2f50-775c888b5a12@synopsys.com> (raw)
In-Reply-To: <20180801152330.GE32125@lunn.ch>

Hi Andrew,

Thanks for the review!

On 01-08-2018 16:23, Andrew Lunn wrote:
>> @@ -842,6 +863,12 @@ static void stmmac_adjust_link(struct net_device *dev)
>>  			new_state = true;
>>  			ctrl &= ~priv->hw->link.speed_mask;
>>  			switch (phydev->speed) {
>> +			case SPEED_10000:
>> +				ctrl |= priv->hw->link.speed10000;
>> +				break;
>> +			case SPEED_2500:
>> +				ctrl |= priv->hw->link.speed2500;
>> +				break;
>>  			case SPEED_1000:
>>  				ctrl |= priv->hw->link.speed1000;
>>  				break;
> Hi Jose
>
> What PHY did you test this with?

We had some shipping issues with the 10G phy so right now I'm
using a 1G phy ... I would expect that as MDIO is used in both
phys then phylib would take care of everything as long as I
specify in the DT the right interface (SGMII) ... Am I making a
wrong assumption?

>
> 10G phys change the interface mode when the speed change. In general,
> 10/100/1000G copper uses SGMII. A 1G SFP optical module generally
> wants 1000Base-X. 2.5G wants 2500Base-X, 10G copper wants 10GKR, etc.
>
> So your adjust link callback needs to look at phydev->interface and
> reconfigure the MAC as requested.

Sorry, I'm not a phy expert but as long as I use MDIO shouldn't
this be transparent to MAC? I mean, there are no registers about
the interface to use in XGMAC2, there is only this speed
selection register that its implemented already in the
stmmac_adjust_link.

>
> You might also want to consider moving from phylib to phylink. It has
> a better interface for things like this, and makes support for SFP
> interfaces much easier. A MAC which supports 10G is likely to be used
> with SFPs...

Ok, I will take a look into it.

Thanks and Best Regards,
Jose Miguel Abreu

>
>      Andrew

  reply	other threads:[~2018-08-02 10:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 12:10 [PATCH net-next 0/9] Add 10GbE support in stmmac using XGMAC2 Jose Abreu
2018-08-01 12:10 ` [PATCH net-next 1/9] net: stmmac: Add XGMAC 2.10 HWIF entry Jose Abreu
2018-08-01 12:10 ` [PATCH net-next 2/9] net: stmmac: Add MAC related callbacks for XGMAC2 Jose Abreu
2018-08-01 12:10 ` [PATCH net-next 3/9] net: stmmac: Add DMA " Jose Abreu
2018-08-01 12:10 ` [PATCH net-next 4/9] net: stmmac: Add descriptor " Jose Abreu
2018-08-01 12:10 ` [PATCH net-next 5/9] net: stmmac: Add MDIO related functions " Jose Abreu
2018-08-01 15:08   ` Andrew Lunn
2018-08-02  8:36     ` Jose Abreu
2018-08-02 14:11       ` Andrew Lunn
2018-08-01 12:10 ` [PATCH net-next 6/9] net: stmmac: Add PTP support " Jose Abreu
2018-08-01 12:10 ` [PATCH net-next 7/9] net: stmmac: Integrate XGMAC into main driver flow Jose Abreu
2018-08-01 15:23   ` Andrew Lunn
2018-08-02  8:26     ` Jose Abreu [this message]
2018-08-02 14:03       ` Andrew Lunn
2018-08-02 14:15         ` Jose Abreu
2018-08-02 14:36           ` Andrew Lunn
2018-08-02 15:38             ` Jose Abreu
2018-08-02 16:00               ` Andrew Lunn
2018-08-01 12:10 ` [PATCH net-next 8/9] net: stmmac: Add the bindings parsing for XGMAC2 Jose Abreu
2018-08-01 12:10 ` [PATCH net-next 9/9] bindings: net: stmmac: Add the bindings documentation " Jose Abreu
2018-08-01 14:57   ` Sergei Shtylyov

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=6dae65da-699f-77c9-2f50-775c888b5a12@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.