History

can: ctucanfd: mark error-active controller status valid

In the CAN_STATE_ERROR_ACTIVE case, cf->data[1] is set to CAN_ERR_CRTL_ACTIVE, but cf->can_id is not set with CAN_ERR_CRTL in that path. Set CAN_ERR_CRTL so consumers know the controller-status information in cf->data[1] is valid.

Avi Weiss committed 3 months ago

Commit 4e735cb1 parent a6873911 file · +1 −1Browse files

Unified · Split

drivers/net/can/ctucanfd/ctucanfd_base.c+1−1
@@ -869,7 +869,7 @@ static void ctucan_err_interrupt(struct net_device *ndev, u32 isr) · 868 unmodified lines
869869 break;
870870 case CAN_STATE_ERROR_ACTIVE:
871871 if (skb) {
872− cf->can_id |= CAN_ERR_CNT;
872+ cf->can_id |= CAN_ERR_CRTL | CAN_ERR_CNT;
873873 cf->data[1] = CAN_ERR_CRTL_ACTIVE;
874874 cf->data[6] = bec.txerr;
875875 cf->data[7] = bec.rxerr;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t