diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2022-10-01 19:16:16 -0700 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2022-10-01 19:16:16 -0700 |
| commit | 305a72efa791c826fe84768ca55e31adc4113ea8 (patch) | |
| tree | 35c72646ea4b81528d73d3d79650004abed3285b /include/uapi/linux/can/error.h | |
| parent | 53fc59511fc4c567342b2ef3f7b99a086430e0b4 (diff) | |
| parent | 6a02124c87f0b61dcaaeb65e7fd406d8afb40fd4 (diff) | |
Merge branch 'for-6.1/nvdimm' into libnvdimm-for-next
Add v6.1 content on top of some straggling updates that missed v6.0.
Diffstat (limited to 'include/uapi/linux/can/error.h')
| -rw-r--r-- | include/uapi/linux/can/error.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/uapi/linux/can/error.h b/include/uapi/linux/can/error.h index 34633283de64..acc1ac393d2a 100644 --- a/include/uapi/linux/can/error.h +++ b/include/uapi/linux/can/error.h @@ -57,6 +57,8 @@ #define CAN_ERR_BUSOFF 0x00000040U /* bus off */ #define CAN_ERR_BUSERROR 0x00000080U /* bus error (may flood!) */ #define CAN_ERR_RESTARTED 0x00000100U /* controller restarted */ +#define CAN_ERR_CNT 0x00000200U /* TX error counter / data[6] */ + /* RX error counter / data[7] */ /* arbitration lost in bit ... / data[0] */ #define CAN_ERR_LOSTARB_UNSPEC 0x00 /* unspecified */ @@ -120,6 +122,22 @@ #define CAN_ERR_TRX_CANL_SHORT_TO_GND 0x70 /* 0111 0000 */ #define CAN_ERR_TRX_CANL_SHORT_TO_CANH 0x80 /* 1000 0000 */ -/* controller specific additional information / data[5..7] */ +/* data[5] is reserved (do not use) */ + +/* TX error counter / data[6] */ +/* RX error counter / data[7] */ + +/* CAN state thresholds + * + * Error counter Error state + * ----------------------------------- + * 0 - 95 Error-active + * 96 - 127 Error-warning + * 128 - 255 Error-passive + * 256 and greater Bus-off + */ +#define CAN_ERROR_WARNING_THRESHOLD 96 +#define CAN_ERROR_PASSIVE_THRESHOLD 128 +#define CAN_BUS_OFF_THRESHOLD 256 #endif /* _UAPI_CAN_ERROR_H */ |
