Skip to content

net: dsa: remove restriction on platform_device

Florian Fainelli netdev 2 versions Applied

Status from this message: Applied, thanks Florian.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesApplied
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- fix build for !CONFIG_OF_NET

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2net: core: add of_find_net_device_by_node()include/linux/of_net.h net/core/net-sysfs.c+33 -00 replies
2/2net: dsa: utilize of_find_net_device_by_nodeinclude/net/dsa.h net/dsa/dsa.c+12 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH net-next 0/2 v2] net: dsa: remove restriction on platform_device

Hi all,

This patch series removes the restriction in DSA to operate exclusively with platform_device Ethernet MAC drivers when using Device Tree. This basically allows arbitrary Ethernet MAC drivers to be used now in conjunction with Device Tree.

The reason was that DSA was using a of_find_device_by_node() which limits the device_node to device pointer search exclusively to platform_device, in our case, we are interested in doing a "class" research and lookup the net_device.

Thanks to Chris Packham for testing this on his platform.

Changes in v2:

- fix build for !CONFIG_OF_NET

Florian Fainelli (2):
net: core: add of_find_net_device_by_node()
net: dsa: utilize of_find_net_device_by_node

 include/linux/of_net.h |  8 ++++++++
 include/net/dsa.h      |  1 +
 net/core/net-sysfs.c   | 25 +++++++++++++++++++++++++
 net/dsa/dsa.c          | 16 +++++++++++-----
 4 files changed, 45 insertions(+), 5 deletions(-)
Signature · 1 line
2.1.0