]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: don't do devlink port setup early
authorJiri Pirko <jiri@nvidia.com>
Thu, 29 Sep 2022 07:29:01 +0000 (09:29 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 1 Oct 2022 01:17:16 +0000 (18:17 -0700)
commit2a77e46f2d996fe5c40c3165f8ee25606ba49144
treee9cce6ccbd55520a09d97b56658dfb8024d82aee
parent7a0f1e8a2904945c0014a54a579ab642e4bac622
net: dsa: don't do devlink port setup early

Commit 94005a791fde ("net: dsa: Register devlink ports before calling DSA driver setup()")
moved devlink port setup to be done early before driver setup()
was called. That is no longer needed, so move the devlink port
initialization back to dsa_port_setup(), as the first thing done there.

Note there is no longer needed to reinit port as unused if
dsa_port_setup() fails, as it unregisters the devlink port instance on
the error path.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/dsa2.c