mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
can: ems_usb: improve error reporting for error warning and error passive
This patch adds the missing CAN_ERR_CRTL to cf->can_id in case of CAN_STATE_ERROR_WARNING or CAN_STATE_ERROR_PASSIVE Signed-off-by: Martin Lederhilger <m.lederhilger@ds-automotion.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
13454c1455
commit
6ebc5e8fe8
1 changed files with 1 additions and 0 deletions
|
@ -395,6 +395,7 @@ static void ems_usb_rx_err(struct ems_usb *dev, struct ems_cpc_msg *msg)
|
||||||
|
|
||||||
if (dev->can.state == CAN_STATE_ERROR_WARNING ||
|
if (dev->can.state == CAN_STATE_ERROR_WARNING ||
|
||||||
dev->can.state == CAN_STATE_ERROR_PASSIVE) {
|
dev->can.state == CAN_STATE_ERROR_PASSIVE) {
|
||||||
|
cf->can_id |= CAN_ERR_CRTL;
|
||||||
cf->data[1] = (txerr > rxerr) ?
|
cf->data[1] = (txerr > rxerr) ?
|
||||||
CAN_ERR_CRTL_TX_PASSIVE : CAN_ERR_CRTL_RX_PASSIVE;
|
CAN_ERR_CRTL_TX_PASSIVE : CAN_ERR_CRTL_RX_PASSIVE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue