OSDN Git Service

aquantia: Fix transient invalid link down/up indications
authorIgor Russkikh <igor.russkikh@aquantia.com>
Mon, 25 Sep 2017 07:48:49 +0000 (10:48 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Sep 2017 20:44:31 +0000 (13:44 -0700)
Due to a bug in aquantia atlantic card firmware, it sometimes reports
invalid link speed bits. That caused driver to report link down events,
although link itself is totally fine.

This patch ignores such out of blue readings.

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/hw_atl/hw_atl_utils.c

index 4f5ec9a..bf734b3 100644 (file)
@@ -351,8 +351,7 @@ int hw_atl_utils_mpi_get_link_status(struct aq_hw_s *self)
                        break;
 
                default:
-                       link_status->mbps = 0U;
-                       break;
+                       return -EBUSY;
                }
        }