]> git.baikalelectronics.ru Git - kernel.git/commit
net: systemport: use standard netdevice notifier to detect DSA presence
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 7 Jan 2021 01:24:02 +0000 (03:24 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jan 2021 23:42:07 +0000 (15:42 -0800)
commita2a7445fe2f4d9774a7bcfaa12815a18f43edc7c
treeeb48a405fee91d9ecd336f70d1eb361f1b008dec
parentb3f47f951505745e64688a601b209c4f2f58616c
net: systemport: use standard netdevice notifier to detect DSA presence

The SYSTEMPORT driver maps each port of the embedded Broadcom DSA switch
port to a certain queue of the master Ethernet controller. For that it
currently uses a dedicated notifier infrastructure which was added in
commit dfa1e5d77c79 ("net: dsa: Add support for DSA specific notifiers").

However, since commit 6a3226035fc2 ("net: dsa: link interfaces with the
DSA master to get rid of lockdep warnings"), DSA is actually an upper of
the Broadcom SYSTEMPORT as far as the netdevice adjacency lists are
concerned. So naturally, the plain NETDEV_CHANGEUPPER net device notifiers
are emitted. It looks like there is enough API exposed by DSA to the
outside world already to make the call_dsa_notifiers API redundant. So
let's convert its only user to plain netdev notifiers.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bcmsysport.c
drivers/net/ethernet/broadcom/bcmsysport.h