提交 02d5d11b 编写于 作者: T Tony Zelenoff 提交者: David S. Miller

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: NTony Zelenoff <antonz@parallels.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5c3d52ef
...@@ -155,14 +155,20 @@ static void atlx_set_multi(struct net_device *netdev) ...@@ -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 * atlx_irq_enable - Enable default interrupt generation settings
* @adapter: board private structure * @adapter: board private structure
*/ */
static void atlx_irq_enable(struct atlx_adapter *adapter) static void atlx_irq_enable(struct atlx_adapter *adapter)
{ {
iowrite32(IMR_NORMAL_MASK, adapter->hw.hw_addr + REG_IMR); atlx_imr_set(adapter, IMR_NORMAL_MASK);
ioread32(adapter->hw.hw_addr + REG_IMR);
} }
/* /*
...@@ -171,8 +177,7 @@ static void atlx_irq_enable(struct atlx_adapter *adapter) ...@@ -171,8 +177,7 @@ static void atlx_irq_enable(struct atlx_adapter *adapter)
*/ */
static void atlx_irq_disable(struct atlx_adapter *adapter) static void atlx_irq_disable(struct atlx_adapter *adapter)
{ {
iowrite32(0, adapter->hw.hw_addr + REG_IMR); atlx_imr_set(adapter, 0);
ioread32(adapter->hw.hw_addr + REG_IMR);
synchronize_irq(adapter->pdev->irq); synchronize_irq(adapter->pdev->irq);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册