[PATCH 7/9] net: aquantia: Fixed transient link up/down/up notification

AceLan Kao acelan.kao at canonical.com
Tue Nov 7 01:52:01 UTC 2017

From: Igor Russkikh <igor.russkikh at aquantia.com>

BugLink: http://bugs.launchpad.net/bugs/1730544

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 at aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh at aquantia.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit 93d87b8fbe6cf17f0ad9552a934b5a6623ccd7d1)
Signed-off-by: AceLan Kao <acelan.kao at canonical.com>
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
index 5ba63d5..c628089 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -349,6 +349,7 @@ struct aq_nic_s *aq_nic_alloc_hot(struct net_device *ndev)
 	if (netif_running(ndev))
+	netif_carrier_off(self->ndev);
 	for (self->aq_vecs = 0; self->aq_vecs < self->aq_nic_cfg.vecs;
 		self->aq_vecs++) {
@@ -916,6 +917,7 @@ int aq_nic_stop(struct aq_nic_s *self)
 	unsigned int i = 0U;
+	netif_carrier_off(self->ndev);

More information about the kernel-team mailing list