net: aquantia: improve ifup link detection
authorIgor Russkikh <Igor.Russkikh@aquantia.com>
Mon, 29 Apr 2019 10:04:50 +0000 (10:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 May 2019 13:30:15 +0000 (09:30 -0400)
Original code detected link only after 1 sec is passed after up.
Here we replace this with direct service callback which updates
link status immediately

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 0251566b66afae20a2cc32afa7e568f73f891bd6..6de0d1c0ed79a371d73a495797ec65d7a49b94f0 100644 (file)
@@ -355,8 +355,7 @@ int aq_nic_start(struct aq_nic_s *self)
        if (err)
                goto err_exit;
        timer_setup(&self->service_timer, aq_nic_service_timer_cb, 0);
-       mod_timer(&self->service_timer, jiffies +
-                 AQ_CFG_SERVICE_TIMER_INTERVAL);
+       aq_nic_service_timer_cb(&self->service_timer);
 
        if (self->aq_nic_cfg.is_polling) {
                timer_setup(&self->polling_timer, aq_nic_polling_timer_cb, 0);