net: dsa: reorder PHY initialization with MTU setup in slave.c
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 5 Jan 2022 23:11:12 +0000 (01:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jan 2022 11:59:09 +0000 (11:59 +0000)
commit904e112ad431492b34f235f59738e8312802bbf9
tree08116a973dbe5a574aba8e8d1d5df03ab41bba28
parentd093d17c9554be794b1bd83971fb6d0ae3ea77b1
net: dsa: reorder PHY initialization with MTU setup in slave.c

In dsa_slave_create() there are 2 sections that take rtnl_lock():
MTU change and netdev registration. They are separated by PHY
initialization.

There isn't any strict ordering requirement except for the fact that
netdev registration should be last. Therefore, we can perform the MTU
change a bit later, after the PHY setup. A future change will then be
able to merge the two rtnl_lock sections into one.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c