netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] introduce mii_bmcr_encode_fixed()
@ 2022-06-18 10:00 Russell King (Oracle)
  2022-06-18 10:28 ` [PATCH net-next 1/4] net: mii: add mii_bmcr_encode_fixed() Russell King (Oracle)
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Russell King (Oracle) @ 2022-06-18 10:00 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Jose Abreu,
	netdev, Paolo Abeni

Hi,

While converting the mv88e6xxx driver to phylink pcs, it has been
noticed that we've started to have repeated cases where we convert a
speed and duplex to a BMCR value.

Rather than open coding this in multiple locations, let's provide a
helper for this - in linux/mii.h. This helper not only takes care of
the standard 10, 100 and 1000Mbps encodings, but also includes
2500Mbps (which is the same as 1000Mbps) for those users who require
that encoding as well. Unknown speeds will be encoded to 10Mbps, and
non-full duplexes will be encoded as half duplex.

This series converts the existing users to the new helper, and the
mv88e6xxx conversion will add further users in the 6352 and 639x PCS
code.

 drivers/net/pcs/pcs-xpcs.c   | 18 +-----------------
 drivers/net/phy/marvell.c    | 10 ++--------
 drivers/net/phy/phy_device.c | 18 +++---------------
 include/linux/mii.h          | 35 +++++++++++++++++++++++++++++++++++
 4 files changed, 41 insertions(+), 40 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

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

end of thread, other threads:[~2022-06-19  9:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-18 10:00 [PATCH net-next 0/4] introduce mii_bmcr_encode_fixed() Russell King (Oracle)
2022-06-18 10:28 ` [PATCH net-next 1/4] net: mii: add mii_bmcr_encode_fixed() Russell King (Oracle)
2022-06-18 10:28 ` [PATCH net-next 2/4] net: phy: use mii_bmcr_encode_fixed() Russell King (Oracle)
2022-06-18 10:28 ` [PATCH net-next 3/4] net: phy: marvell: " Russell King (Oracle)
2022-06-18 10:28 ` [PATCH net-next 4/4] net: pcs: pcs-xpcs: " Russell King (Oracle)
2022-06-19  9:50 ` [PATCH net-next 0/4] introduce mii_bmcr_encode_fixed() patchwork-bot+netdevbpf

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