提交 2206fcbc 编写于 作者: S Srinivas Neeli 提交者: Marc Kleine-Budde

can: xilinx_can: Add check for NAPI Poll function

Add check for NAPI poll function to avoid enabling interrupts
with out completing the NAPI call.

Link: https://lore.kernel.org/all/20220208162053.39896-1-srinivas.neeli@xilinx.comSigned-off-by: NSrinivas Neeli <srinivas.neeli@xilinx.com>
Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
上级 51ae468a
......@@ -1215,10 +1215,11 @@ static int xcan_rx_poll(struct napi_struct *napi, int quota)
}
if (work_done < quota) {
napi_complete_done(napi, work_done);
ier = priv->read_reg(priv, XCAN_IER_OFFSET);
ier |= xcan_rx_int_mask(priv);
priv->write_reg(priv, XCAN_IER_OFFSET, ier);
if (napi_complete_done(napi, work_done)) {
ier = priv->read_reg(priv, XCAN_IER_OFFSET);
ier |= xcan_rx_int_mask(priv);
priv->write_reg(priv, XCAN_IER_OFFSET, ier);
}
}
return work_done;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册