]> 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)
commitd2e7b62420b0b0736f9b6007ad40a04b816d46e6
tree08116a973dbe5a574aba8e8d1d5df03ab41bba28
parent60e87ab541cc7b2846ebdc7b494ca8f6974a6bd6
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