From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>,
netdev@vger.kernel.org,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Antoine Tenart <antoine.tenart@bootlin.com>
Subject: Re: [RFC PATCH] net: mvpp2: fix detection of 10G SFP modules
Date: Thu, 29 Nov 2018 22:00:43 +0000 [thread overview]
Message-ID: <20181129220043.GB30658@n2100.armlinux.org.uk> (raw)
In-Reply-To: <cd79f999-f2f5-8cd4-2d2a-3b6ef9a84583@gmail.com>
On Thu, Nov 29, 2018 at 11:31:23AM -0800, Florian Fainelli wrote:
>
>
> On 11/29/2018 4:49 AM, Baruch Siach wrote:
> > The mvpp2_phylink_validate() relies on the interface field of
> > phylink_link_state to determine valid link modes. However, when called
> > from phylink_sfp_module_insert() this field in not initialized. The
> > default switch case then excludes 10G link modes. This allows 10G SFP
> > modules that are detected correctly to be configured at max rate of
> > 2.5G.
> >
> > Catch the uninitialized PHY mode case, and allow 10G rates.
> >
> > Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>
> > Cc: Antoine Tenart <antoine.tenart@bootlin.com>
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> > Is that the right fix?
>
> It would be a bit surprising that this is the right fix, you would
> expect validate to be called once everything has been parsed
> successfully from the SFP, is not that the case here? If not, can you
> find out what happens?
Two calls are made - the first with PHY_INTERFACE_MODE_NA to
determine what the advertising link mode may be, and then again
once the interface mode has been selected from the advertising mask.
Why?
Consider a 4.3Mbps fiberchannel SFP plugged into a 1G-only MAC.
If we did it as a single pass, we would end up passing an
interface mode of 2500BASEX first time around which is illogical.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
next prev parent reply other threads:[~2018-11-30 9:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-29 12:49 [RFC PATCH] net: mvpp2: fix detection of 10G SFP modules Baruch Siach
2018-11-29 19:31 ` Florian Fainelli
2018-11-29 19:48 ` Baruch Siach
2018-11-29 22:00 ` Russell King - ARM Linux [this message]
2018-12-04 10:19 ` Baruch Siach
2018-12-04 10:27 ` Russell King - ARM Linux
2018-12-04 11:31 ` Baruch Siach
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=20181129220043.GB30658@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=antoine.tenart@bootlin.com \
--cc=baruch@tkos.co.il \
--cc=f.fainelli@gmail.com \
--cc=maxime.chevallier@bootlin.com \
--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 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).