OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51ae468
)
can: xilinx_can: Add check for NAPI Poll function
author
Srinivas Neeli
<srinivas.neeli@xilinx.com>
Tue, 8 Feb 2022 16:20:53 +0000
(21:50 +0530)
committer
Marc Kleine-Budde
<mkl@pengutronix.de>
Thu, 24 Feb 2022 07:26:04 +0000
(08:26 +0100)
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.com
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/xilinx_can.c
patch
|
blob
|
history
diff --git
a/drivers/net/can/xilinx_can.c
b/drivers/net/can/xilinx_can.c
index
1674b56
..
e562c5a
100644
(file)
--- a/
drivers/net/can/xilinx_can.c
+++ b/
drivers/net/can/xilinx_can.c
@@
-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;
}