diff options
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atlx.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atlx.c b/drivers/net/ethernet/atheros/atlx/atlx.c index 3cd8837236dc..ee83e1cc8b20 100644 --- a/drivers/net/ethernet/atheros/atlx/atlx.c +++ b/drivers/net/ethernet/atheros/atlx/atlx.c | |||
@@ -155,14 +155,20 @@ static void atlx_set_multi(struct net_device *netdev) | |||
155 | } | 155 | } |
156 | } | 156 | } |
157 | 157 | ||
158 | static inline void atlx_imr_set(struct atlx_adapter *adapter, | ||
159 | unsigned int imr) | ||
160 | { | ||
161 | iowrite32(imr, adapter->hw.hw_addr + REG_IMR); | ||
162 | ioread32(adapter->hw.hw_addr + REG_IMR); | ||
163 | } | ||
164 | |||
158 | /* | 165 | /* |
159 | * atlx_irq_enable - Enable default interrupt generation settings | 166 | * atlx_irq_enable - Enable default interrupt generation settings |
160 | * @adapter: board private structure | 167 | * @adapter: board private structure |
161 | */ | 168 | */ |
162 | static void atlx_irq_enable(struct atlx_adapter *adapter) | 169 | static void atlx_irq_enable(struct atlx_adapter *adapter) |
163 | { | 170 | { |
164 | iowrite32(IMR_NORMAL_MASK, adapter->hw.hw_addr + REG_IMR); | 171 | atlx_imr_set(adapter, IMR_NORMAL_MASK); |
165 | ioread32(adapter->hw.hw_addr + REG_IMR); | ||
166 | } | 172 | } |
167 | 173 | ||
168 | /* | 174 | /* |
@@ -171,8 +177,7 @@ static void atlx_irq_enable(struct atlx_adapter *adapter) | |||
171 | */ | 177 | */ |
172 | static void atlx_irq_disable(struct atlx_adapter *adapter) | 178 | static void atlx_irq_disable(struct atlx_adapter *adapter) |
173 | { | 179 | { |
174 | iowrite32(0, adapter->hw.hw_addr + REG_IMR); | 180 | atlx_imr_set(adapter, 0); |
175 | ioread32(adapter->hw.hw_addr + REG_IMR); | ||
176 | synchronize_irq(adapter->pdev->irq); | 181 | synchronize_irq(adapter->pdev->irq); |
177 | } | 182 | } |
178 | 183 | ||