]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6bf0e3b74c0bd06f03db7c1c4d72722ba015c151
tree08116a973dbe5a574aba8e8d1d5df03ab41bba28
parent701c9710620061e42e6d69cc5d9e12830c0e45e8
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