On 01/20/2017 02:44 PM, Lino Sanfilippo wrote:


On 18.01.2017 22:42, Timur Tabi wrote:
@@ -1029,8 +1017,6 @@ void emac_mac_down(struct emac_adapter *adpt)
       */
      writel(DIS_INT, adpt->base + EMAC_INT_STATUS);
      writel(0, adpt->base + EMAC_INT_MASK);
-    synchronize_irq(adpt->irq.irq);

There is no reason to remove the irq synchronization, is it?
Note that the desriptors are freed after that so we must be sure that
the irq handler is not running any more.

I'm moving it to stay with the free_irq().

@@ -283,6 +292,9 @@ static int emac_close(struct net_device *netdev)

        mutex_lock(&adpt->reset_lock);

+       synchronize_irq(adpt->irq.irq);
+       free_irq(adpt->irq.irq, &adpt->irq);
+

However, I'll admit that I don't know why we call synchronize_irq() at all.

--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

Reply via email to