mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
bonding: initialize before registration
Avoid a unnecessary carrier state transistion that happens when device is registered. Lockdep works better if initialization is done before registration as well. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
d2991f7535
commit
d93216051a
1 changed files with 4 additions and 4 deletions
|
|
@ -5164,15 +5164,15 @@ int bond_create(const char *name)
|
|||
goto out_netdev;
|
||||
}
|
||||
|
||||
bond_set_lockdep_class(bond_dev);
|
||||
|
||||
netif_carrier_off(bond_dev);
|
||||
|
||||
res = register_netdevice(bond_dev);
|
||||
if (res < 0) {
|
||||
goto out_bond;
|
||||
}
|
||||
|
||||
bond_set_lockdep_class(bond_dev);
|
||||
|
||||
netif_carrier_off(bond_dev);
|
||||
|
||||
up_write(&bonding_rwsem);
|
||||
rtnl_unlock(); /* allows sysfs registration of net device */
|
||||
res = bond_create_sysfs_entry(netdev_priv(bond_dev));
|
||||
|
|
|
|||
Loading…
Reference in a new issue