]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: aquantia: Fixed transient link up/down/up notification
authorIgor Russkikh <igor.russkikh@aquantia.com>
Thu, 19 Oct 2017 15:23:55 +0000 (18:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Oct 2017 11:32:24 +0000 (12:32 +0100)
When doing ifconfig down/up, driver did not reported carrier_off neither
in nic_stop nor in nic_start. That caused link to be visible as "up"
during couple of seconds immediately after "ifconfig up".

Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_nic.c

index 6b49dd65801279fa8a731e89956b4cc18dd141b6..9378b48777830953477310f242efdd240f6ab2a5 100644 (file)
@@ -337,6 +337,7 @@ struct aq_nic_s *aq_nic_alloc_hot(struct net_device *ndev)
        }
        if (netif_running(ndev))
                netif_tx_disable(ndev);
+       netif_carrier_off(self->ndev);
 
        for (self->aq_vecs = 0; self->aq_vecs < self->aq_nic_cfg.vecs;
                self->aq_vecs++) {
@@ -902,6 +903,7 @@ int aq_nic_stop(struct aq_nic_s *self)
        unsigned int i = 0U;
 
        netif_tx_disable(self->ndev);
+       netif_carrier_off(self->ndev);
 
        del_timer_sync(&self->service_timer);