]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: aquantia: link interrupt handling function
authorIgor Russkikh <Igor.Russkikh@aquantia.com>
Mon, 29 Apr 2019 10:04:43 +0000 (10:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 May 2019 13:30:15 +0000 (09:30 -0400)
Define link interrupt handler

Signed-off-by: Nikita Danilov <ndanilov@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 059df86e8e378be42521f9b9c1a62271a1584a3d..4851fc0a3ae5d74174cc5265fba6b98a5a8af04c 100644 (file)
@@ -161,6 +161,20 @@ static int aq_nic_update_link_status(struct aq_nic_s *self)
        return 0;
 }
 
+static irqreturn_t aq_linkstate_threaded_isr(int irq, void *private)
+{
+       struct aq_nic_s *self = private;
+
+       if (!self)
+               return IRQ_NONE;
+
+       aq_nic_update_link_status(self);
+
+       self->aq_hw_ops->hw_irq_enable(self->aq_hw,
+                                      BIT(self->aq_nic_cfg.link_irq_vec));
+       return IRQ_HANDLED;
+}
+
 static void aq_nic_service_timer_cb(struct timer_list *t)
 {
        struct aq_nic_s *self = from_timer(self, t, service_timer);