diff options
author | Shannon Nelson <snelson@pensando.io> | 2020-11-12 10:22:01 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-17 14:16:59 +0100 |
commit | bca9046c36d39ebce2eed4577d29910131307e3f (patch) | |
tree | 7c036729c6cc15d27df8aba5c2ebc4dfa0cdf261 | |
parent | 6aebfdacad97bd0f52a80dcf0b49aa123bedf2cc (diff) | |
download | linux-stable-bca9046c36d39ebce2eed4577d29910131307e3f.tar.gz linux-stable-bca9046c36d39ebce2eed4577d29910131307e3f.tar.bz2 linux-stable-bca9046c36d39ebce2eed4577d29910131307e3f.zip |
ionic: start queues before announcing link up
commit 8f56bc4dc1011be6e2a53198b615fdc588b4ef6a upstream.
Change the order of operations in the link_up handling to be
sure that the queues are up and ready before we announce that
the link is up.
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_lif.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index c968c5c5a60a..d0ae1cf43592 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -123,6 +123,12 @@ static void ionic_link_status_check(struct ionic_lif *lif) link_up = link_status == IONIC_PORT_OPER_STATUS_UP; if (link_up) { + if (lif->netdev->flags & IFF_UP && netif_running(lif->netdev)) { + mutex_lock(&lif->queue_lock); + ionic_start_queues(lif); + mutex_unlock(&lif->queue_lock); + } + if (!netif_carrier_ok(netdev)) { u32 link_speed; @@ -132,12 +138,6 @@ static void ionic_link_status_check(struct ionic_lif *lif) link_speed / 1000); netif_carrier_on(netdev); } - - if (lif->netdev->flags & IFF_UP && netif_running(lif->netdev)) { - mutex_lock(&lif->queue_lock); - ionic_start_queues(lif); - mutex_unlock(&lif->queue_lock); - } } else { if (netif_carrier_ok(netdev)) { netdev_info(netdev, "Link down\n"); |