diff options
author | Tony Zelenoff <antonz@parallels.com> | 2012-04-13 06:09:50 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-15 12:56:02 -0400 |
commit | 02d5d11bfa6d94676856c048a8471a4014368492 (patch) | |
tree | 1bef807bbc5726505ba42923326e74fccbb18f6c /drivers/net/ethernet/atheros/atlx | |
parent | 5c3d52ef5a043b17175b50c9b8a7a043dd763662 (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>
Diffstat (limited to 'drivers/net/ethernet/atheros/atlx')
-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 3cd8837236d..ee83e1cc8b2 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) } } +static inline void atlx_imr_set(struct atlx_adapter *adapter, + unsigned int imr) +{ + iowrite32(imr, adapter->hw.hw_addr + REG_IMR); + ioread32(adapter->hw.hw_addr + REG_IMR); +} + /* * atlx_irq_enable - Enable default interrupt generation settings * @adapter: board private structure */ static void atlx_irq_enable(struct atlx_adapter *adapter) { - iowrite32(IMR_NORMAL_MASK, adapter->hw.hw_addr + REG_IMR); - ioread32(adapter->hw.hw_addr + REG_IMR); + atlx_imr_set(adapter, IMR_NORMAL_MASK); } /* @@ -171,8 +177,7 @@ static void atlx_irq_enable(struct atlx_adapter *adapter) */ static void atlx_irq_disable(struct atlx_adapter *adapter) { - iowrite32(0, adapter->hw.hw_addr + REG_IMR); - ioread32(adapter->hw.hw_addr + REG_IMR); + atlx_imr_set(adapter, 0); synchronize_irq(adapter->pdev->irq); } |