aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Zelenoff <antonz@parallels.com>2012-04-13 02:09:50 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-15 12:56:02 -0400
commit02d5d11bfa6d94676856c048a8471a4014368492 (patch)
tree1bef807bbc5726505ba42923326e74fccbb18f6c
parent5c3d52ef5a043b17175b50c9b8a7a043dd763662 (diff)
atl1: make function to set imr of card
This function should be used later to set/remove proper bits in imr to disable only rx ints. Signed-off-by: Tony Zelenoff <antonz@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/atheros/atlx/atlx.c13
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
158static 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 */
162static void atlx_irq_enable(struct atlx_adapter *adapter) 169static 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 */
172static void atlx_irq_disable(struct atlx_adapter *adapter) 178static 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