提交 711e4d6e 编写于 作者: S Sascha Hauer 提交者: Marc Kleine-Budde

can: mcp251x: increase rx_errors on overflow, not only rx_over_errors

Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
Acked-by: NWolfgang Grandegger <wg@grandegger.com>
上级 57d3c7b0
......@@ -816,10 +816,14 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
if (intf & CANINTF_ERRIF) {
/* Handle overflow counters */
if (eflag & (EFLG_RX0OVR | EFLG_RX1OVR)) {
if (eflag & EFLG_RX0OVR)
if (eflag & EFLG_RX0OVR) {
net->stats.rx_over_errors++;
if (eflag & EFLG_RX1OVR)
net->stats.rx_errors++;
}
if (eflag & EFLG_RX1OVR) {
net->stats.rx_over_errors++;
net->stats.rx_errors++;
}
can_id |= CAN_ERR_CRTL;
data1 |= CAN_ERR_CRTL_RX_OVERFLOW;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册