Thread (7 messages) 7 messages, 3 authors, 2018-12-04

Re: [RFC PATCH] net: mvpp2: fix detection of 10G SFP modules

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2018-11-30 06:37:58


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 <redacted>
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?
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help