提交 136cd14e 编写于 作者: T Tony Zelenoff 提交者: David S. Miller

atl1: do not drop rx/tx interrupts before they are scheduled

To prevent interrupts lost they should be dropped only if
they are scheduled via napi interfaces. In other case, there is
exists situation when napi handler process TX interrupt, stay in
RX processing and in that moment any other interrupt received.
Then before this patch TX bit in ISR will be cleaned, napi
schedule will not occur in case of currently processing event and
TX interrupt definitely will be lost.
Signed-off-by: NTony Zelenoff <antonz@parallels.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2a9bc71e
...@@ -2504,8 +2504,12 @@ static irqreturn_t atl1_intr(int irq, void *data) ...@@ -2504,8 +2504,12 @@ static irqreturn_t atl1_intr(int irq, void *data)
if (!status) if (!status)
return IRQ_NONE; return IRQ_NONE;
/* clear CMB interrupt status at once */ /* clear CMB interrupt status at once,
adapter->cmb.cmb->int_stats = 0; * but leave rx/tx interrupt status in case it should be dropped
* only if rx/tx processing queued. In other case interrupt
* can be lost.
*/
adapter->cmb.cmb->int_stats = status & (ISR_CMB_TX | ISR_CMB_RX);
if (status & ISR_GPHY) /* clear phy status */ if (status & ISR_GPHY) /* clear phy status */
atlx_clear_phy_int(adapter); atlx_clear_phy_int(adapter);
...@@ -2547,8 +2551,10 @@ static irqreturn_t atl1_intr(int irq, void *data) ...@@ -2547,8 +2551,10 @@ static irqreturn_t atl1_intr(int irq, void *data)
} }
/* transmit or receive event */ /* transmit or receive event */
if (status & (ISR_CMB_TX | ISR_CMB_RX)) if (status & (ISR_CMB_TX | ISR_CMB_RX) &&
atl1_sched_rings_clean(adapter); atl1_sched_rings_clean(adapter))
adapter->cmb.cmb->int_stats = adapter->cmb.cmb->int_stats &
~(ISR_CMB_TX | ISR_CMB_RX);
/* rx exception */ /* rx exception */
if (unlikely(status & (ISR_RXF_OV | ISR_RFD_UNRUN | if (unlikely(status & (ISR_RXF_OV | ISR_RFD_UNRUN |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册