Skip to content

RFC Allow DSA drivers to set all phylink capabilities

Russell King (Oracle) netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest0 of 12 patches 3 repliesIn review

Patches in v1 No applies recorded yet

None of the 12 patches the cover letter announces are in this archive.

Reviews trailers per patch

PatchVladimir OlteanKurt KanzenbachHauke MehrtensFlorian FainelliTom Lendacky
SeriesR-b R-b R-b T-b R-b T-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH RFC net-next 00/12] Allow DSA drivers to set all phylink capabilities

Hi,

During the last cycle, I introduced a phylink_get_interfaces() method for DSA drivers to be able to fill out the supported_interfaces member of phylink_config. However, further phylink development allowing the validation hook to be greatly simplified became possible when a bitmask of MAC capabilities is used along with the supported_interfaces bitmap.

In order to allow DSA drivers to fill out both fields, we either need to add another method, or change the existing method. As there are no users of the phylink_get_interfaces() yet, let's take the latter approach, and pass the phylink_config structure to the DSA driver, so that it can set both fields. (patch 3)

We also add the capability for DSA drivers to transition to using the phylink_generic_validate() functionality by filling out the phylink mac_capabilities field, and removing their .phylink_validate method. (patch 2)

This series also contains an initial patch that consolidates the logic in DSA around the call to phylink_create(), meaning that there becomes a single site which issues the new call, rather than two. (patch 1)

The overall effect will be that, once this series has been applied, it becomes possible to start eliminating the phylink validation implementations scattered throughout the DSA drivers. Patches to do this will follow once this series is merged.

I am including nine DSA drivers that were relatively simple to convert in this series. The more complex ones will follow later. Please note that none of these DSA drivers have been tested beyond a build-test, so should be checked by the DSA switch driver maintainers.

 include/net/dsa.h  |  4 ++--
 net/dsa/dsa_priv.h |  2 +-
 net/dsa/port.c     | 48 +++++++++++++++++++++++++++++++-----------------
 net/dsa/slave.c    | 19 +++----------------
 4 files changed, 37 insertions(+), 36 deletions(-)
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!