Unfortunately it is not clear from code is usage of
IMR register possible or not. So, to prevent possible
side-effects of reading this register i prefer store
interrupts enable flag separately.
Signed-off-by: Tony Zelenoff <antonz@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
u16 ict; /* interrupt clear timer (2us resolution */
struct mii_if_info mii; /* MII interface info */
+ /*
+ * Use this value to check is napi handler allowed to
+ * enable ints or not
+ */
+ bool int_enabled;
+
u32 bd_number; /* board number */
bool pci_using_64;
struct atl1_hw hw;
static void atlx_irq_enable(struct atlx_adapter *adapter)
{
atlx_imr_set(adapter, IMR_NORMAL_MASK);
+ adapter->int_enabled = true;
}
/*
*/
static void atlx_irq_disable(struct atlx_adapter *adapter)
{
+ adapter->int_enabled = false;
atlx_imr_set(adapter, 0);
synchronize_irq(adapter->pdev->irq);
}