Skip to content

Commit

Permalink
ionic: change mtu after queues are stopped
Browse files Browse the repository at this point in the history
Order of operations is slightly more correct in the driver
to change the netdev->mtu after the queues have been stopped
rather than before.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Shannon Nelson authored and Jakub Kicinski committed Dec 2, 2020
1 parent c0c682e commit 79ba55a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/pensando/ionic/ionic_lif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,12 +1465,14 @@ static int ionic_change_mtu(struct net_device *netdev, int new_mtu)
if (err)
return err;

netdev->mtu = new_mtu;
/* if we're not running, nothing more to do */
if (!netif_running(netdev))
if (!netif_running(netdev)) {
netdev->mtu = new_mtu;
return 0;
}

ionic_stop_queues_reconfig(lif);
netdev->mtu = new_mtu;
return ionic_start_queues_reconfig(lif);
}

Expand Down

0 comments on commit 79ba55a

Please sign in to comment.