diff options
author | Tony Zelenoff <antonz@parallels.com> | 2012-04-13 02:09:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-15 12:56:02 -0400 |
commit | aa45ba90b59b7a18b067b898a8cc8ccf8cbbb261 (patch) | |
tree | dd77024474a8360036886a0202fd7439789f43c6 /drivers/net/ethernet/atheros/atlx | |
parent | 02d5d11bfa6d94676856c048a8471a4014368492 (diff) |
atl1: add value to check ability of reenabling IRQs
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>
Diffstat (limited to 'drivers/net/ethernet/atheros/atlx')
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atl1.h | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atlx.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.h b/drivers/net/ethernet/atheros/atlx/atl1.h index 71bb50dfc5fa..117a0da360b8 100644 --- a/drivers/net/ethernet/atheros/atlx/atl1.h +++ b/drivers/net/ethernet/atheros/atlx/atl1.h | |||
@@ -783,6 +783,12 @@ struct atl1_adapter { | |||
783 | u16 ict; /* interrupt clear timer (2us resolution */ | 783 | u16 ict; /* interrupt clear timer (2us resolution */ |
784 | struct mii_if_info mii; /* MII interface info */ | 784 | struct mii_if_info mii; /* MII interface info */ |
785 | 785 | ||
786 | /* | ||
787 | * Use this value to check is napi handler allowed to | ||
788 | * enable ints or not | ||
789 | */ | ||
790 | bool int_enabled; | ||
791 | |||
786 | u32 bd_number; /* board number */ | 792 | u32 bd_number; /* board number */ |
787 | bool pci_using_64; | 793 | bool pci_using_64; |
788 | struct atl1_hw hw; | 794 | struct atl1_hw hw; |
diff --git a/drivers/net/ethernet/atheros/atlx/atlx.c b/drivers/net/ethernet/atheros/atlx/atlx.c index ee83e1cc8b20..95975b5b7f70 100644 --- a/drivers/net/ethernet/atheros/atlx/atlx.c +++ b/drivers/net/ethernet/atheros/atlx/atlx.c | |||
@@ -169,6 +169,7 @@ static inline void atlx_imr_set(struct atlx_adapter *adapter, | |||
169 | static void atlx_irq_enable(struct atlx_adapter *adapter) | 169 | static void atlx_irq_enable(struct atlx_adapter *adapter) |
170 | { | 170 | { |
171 | atlx_imr_set(adapter, IMR_NORMAL_MASK); | 171 | atlx_imr_set(adapter, IMR_NORMAL_MASK); |
172 | adapter->int_enabled = true; | ||
172 | } | 173 | } |
173 | 174 | ||
174 | /* | 175 | /* |
@@ -177,6 +178,7 @@ static void atlx_irq_enable(struct atlx_adapter *adapter) | |||
177 | */ | 178 | */ |
178 | static void atlx_irq_disable(struct atlx_adapter *adapter) | 179 | static void atlx_irq_disable(struct atlx_adapter *adapter) |
179 | { | 180 | { |
181 | adapter->int_enabled = false; | ||
180 | atlx_imr_set(adapter, 0); | 182 | atlx_imr_set(adapter, 0); |
181 | synchronize_irq(adapter->pdev->irq); | 183 | synchronize_irq(adapter->pdev->irq); |
182 | } | 184 | } |