Commit 93d87b8f authored by Igor Russkikh's avatar Igor Russkikh Committed by David S. Miller

net: aquantia: Fixed transient link up/down/up notification

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: default avatarPavel Belous <pavel.belous@aquantia.com>
Signed-off-by: default avatarIgor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5d8d84e9
...@@ -337,6 +337,7 @@ struct aq_nic_s *aq_nic_alloc_hot(struct net_device *ndev) ...@@ -337,6 +337,7 @@ struct aq_nic_s *aq_nic_alloc_hot(struct net_device *ndev)
} }
if (netif_running(ndev)) if (netif_running(ndev))
netif_tx_disable(ndev); netif_tx_disable(ndev);
netif_carrier_off(self->ndev);
for (self->aq_vecs = 0; self->aq_vecs < self->aq_nic_cfg.vecs; for (self->aq_vecs = 0; self->aq_vecs < self->aq_nic_cfg.vecs;
self->aq_vecs++) { self->aq_vecs++) {
...@@ -902,6 +903,7 @@ int aq_nic_stop(struct aq_nic_s *self) ...@@ -902,6 +903,7 @@ int aq_nic_stop(struct aq_nic_s *self)
unsigned int i = 0U; unsigned int i = 0U;
netif_tx_disable(self->ndev); netif_tx_disable(self->ndev);
netif_carrier_off(self->ndev);
del_timer_sync(&self->service_timer); del_timer_sync(&self->service_timer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment