Always report CAN_ERR_PROT | CAN_ERR_BUSERROR if ESD_EV_CAN_ERROR_EXT and ecc != 0. Before we missed those EVENTs when state was unequal to priv->old_state Signed-off-by: Frank Jungclaus <frank.jungclaus@xxxxxx> --- drivers/net/can/usb/esd_usb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/usb/esd_usb.c b/drivers/net/can/usb/esd_usb.c index 0b907bc54b70..e14f08d30b0b 100644 --- a/drivers/net/can/usb/esd_usb.c +++ b/drivers/net/can/usb/esd_usb.c @@ -274,12 +274,15 @@ static void esd_usb_rx_event(struct esd_usb_net_priv *priv, rxerr = 0; break; } - } else { + } + + if (ecc) { priv->can.can_stats.bus_error++; stats->rx_errors++; cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR; + /* Store error in CAN protocol (type) in data[2] */ switch (ecc & SJA1000_ECC_MASK) { case SJA1000_ECC_BIT: cf->data[2] |= CAN_ERR_PROT_BIT; -- 2.25.1