From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: "Marek Behún" <kabel@kernel.org>
Cc: netdev@vger.kernel.org
Subject: Re: mvpp2 switch from gmac to xlg requires ifdown/ifup
Date: Fri, 23 Jul 2021 09:05:38 +0100 [thread overview]
Message-ID: <20210723080538.GB22278@shell.armlinux.org.uk> (raw)
In-Reply-To: <20210723035202.09a299d6@thinkpad>
On Fri, Jul 23, 2021 at 03:52:02AM +0200, Marek Behún wrote:
> Hello Russell (and possibly others),
>
> I discovered that with mvpp2 when switching from gmac (sgmii or
> 2500base-x mode) to xlg (10gbase-r mode) due to phylink requesting this
> change, the link won't come up unless I do
> ifconfig ethX down
> ifconfig ethX up
>
> Can be reproduced on MacchiatoBIN:
> 1. connect the two 10g RJ-45 ports (88X3310 PHY) with one cable
> 2. bring the interfaces up
> 3. the PHYs should link in 10gbase-t, links on MACs will go up in
> 10gbase-r
> 4. use ethtool on one of the interfaces to advertise modes only up to
> 2500base-t
> 5. the PHYs will unlink and then link at 2.5gbase-t, links on MACs will
> go up in 2500base-x
> 6. use ethtool on the same interface as in step 4 to advertise all
> supported modes
>
> 7. the PHYs will unlink and then link at 10gbase-t, BUT MACs won't link
> !!!
> 8. execute
> ifconfig ethX down ; ifconfig ethX up
> on both interfaces. After this, the MACs will successfully link in
> 10gbase-r with the PHYs
>
> It seems that the mvpp2 driver code needs to make additional stuff when
> chaning mode from gmac to xlg. I haven't yet been able to find out
> what, though.
>
> BTW I discovered this because I am working on adding support for
> 5gbase-r mode to mvpp2, so that the PHY can support 5gbase-t on copper
> side.
> The ifdown/ifup cycle is required when switching from gmac to xlg, i.e.:
> sgmii to 5gbase-r
> sgmii to 10gbase-r
> 2500base-x to 5gbase-r
> 2500base-x to 10gbase-r
> but also when switching from xlg to different xlg:
> 5gbase-r to 10gbase-r
> 10gbase-r to 5gbase-r
>
> Did someone notice this bug? I see that Russell made some changes in
> the phylink pcs API that touched mvpp2 (the .mac_config method got
> split into .mac_prepare, .mac_config and .mac_finish, and also some
> other changes). I haven't tried yet if the switch from gmac to xlg
> worked at some time in the past. But if it did, maybe these changes
> could be the cause?
What are the PHY leds doing when you encounter this bug?
--
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:[~2021-07-23 8:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-23 1:52 mvpp2 switch from gmac to xlg requires ifdown/ifup Marek Behún
2021-07-23 8:05 ` Russell King (Oracle) [this message]
2021-07-26 15:52 ` Marek Behún
2021-07-26 16:43 ` Russell King (Oracle)
2021-07-26 17:03 ` Marek Behún
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=20210723080538.GB22278@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=kabel@kernel.org \
--cc=netdev@vger.kernel.org \
/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.