netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Link modes representation in phylib
@ 2018-06-18 15:02 Maxime Chevallier
  2018-06-18 15:40 ` Andrew Lunn
  0 siblings, 1 reply; 9+ messages in thread
From: Maxime Chevallier @ 2018-06-18 15:02 UTC (permalink / raw)
  To: davem, Russell King - ARM Linux, Florian Fainelli, Andrew Lunn,
	netdev, Antoine Tenart, thomas.petazzoni@bootlin.com,
	Gregory CLEMENT, Miquel Raynal

Hello everyone,

I'm currently working on adding support for 2.5GBaseT on some Marvell
PHYs (the marvell10g family, including the 88X3310).

However, phylib doesn't quite support these modes yet. Its stores the
different supported and advertised modes in u32 fields, which can't
contain the relevant values for 2500BaseT mode (and all other modes that
come after the 31st one).

I'm refering to the "advertising", "lp_advertising" and "supported"
fields in struct phy_device [1] and also to the "features" in
struct phy_driver [2].

>From what I read, I think there are plans to switch these fields to a
newer representation, using the ETHTOOL_G/SLINKSETTINGS API for example.

>From my quick analysis, it seems this would require changing the drivers
in net/ethernet that still directly access the "phydev->supported"
fields (about 30 of them) to use phy_ethtool_ksettings_{g/s}et, and also
using another way to declare the "features" in phy_driver.

There are quite a lot of references to the "legacy" ways of representing
modes, this would be another step closer to switching the a newer
representation, but since this has an impact in a lot of places in 
net/, so I wanted to have your opinion on that point before attempting
anything.

So would you have any advice on how we should start supporting newer
modes in PHY drivers ?

Thanks,

Maxime

[1]
https://elixir.bootlin.com/linux/v4.18-rc1/source/include/linux/phy.h#L441

[2]
https://elixir.bootlin.com/linux/v4.18-rc1/source/include/linux/phy.h#L512

-- 
Maxime Chevallier, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-06-29 15:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-18 15:02 Link modes representation in phylib Maxime Chevallier
2018-06-18 15:40 ` Andrew Lunn
2018-06-19  9:30   ` Maxime Chevallier
2018-06-19 15:21     ` Andrew Lunn
2018-06-29 13:26       ` Maxime Chevallier
2018-06-29 13:43         ` Andrew Lunn
2018-06-29 15:09           ` Maxime Chevallier
2018-06-29 15:34             ` Andrew Lunn
2018-06-29 15:39               ` Maxime Chevallier

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).