mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
enic: do not call enic_change_mtu in enic_probe
commitcb5c656886upstream. In commitab123fe071("enic: handle mtu change for vf properly") ASSERT_RTNL() is added to _enic_change_mtu() to prevent it from being called without rtnl held. enic_probe() calls enic_change_mtu() without rtnl held. At this point netdev is not registered yet. Remove call to enic_change_mtu and assign the mtu to netdev->mtu. Fixes:ab123fe071("enic: handle mtu change for vf properly") Signed-off-by: Govindarajulu Varadarajan <gvaradar@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a37c70426c
commit
a504227475
@@ -2683,7 +2683,6 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
*/
|
||||
|
||||
enic->port_mtu = enic->config.mtu;
|
||||
(void)enic_change_mtu(netdev, enic->port_mtu);
|
||||
|
||||
err = enic_set_mac_addr(netdev, enic->mac_addr);
|
||||
if (err) {
|
||||
@@ -2732,6 +2731,7 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
netdev->features |= NETIF_F_HIGHDMA;
|
||||
|
||||
netdev->priv_flags |= IFF_UNICAST_FLT;
|
||||
netdev->mtu = enic->port_mtu;
|
||||
|
||||
err = register_netdev(netdev);
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user