History

can: dev: Consolidate and unify state change handling

The handling of can error states is different between platforms. This is an attempt to correct that problem. I've moved this handling into a generic function for changing the error state. This ensures that error state changes are handled the same way everywhere (where this function is used). This new mechanism also adds reverse state transitioning in error frames, i.e. the user will be notified through the socket interface when the state goes down.

Andri Yngvason committed 11 years ago

Commit bac78aa1 parent 04ee0863 files · +82 −0Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/can/error.h+1−0
@@ -71,6 +71,7 @@ · 70 unmodified lines
71#define CAN_ERR_CRTL_TX_PASSIVE 0x20 /* reached error passive status TX */71#define CAN_ERR_CRTL_TX_PASSIVE 0x20 /* reached error passive status TX */
72 /* (at least one error counter exceeds */72 /* (at least one error counter exceeds */
73 /* the protocol-defined level of 127) */73 /* the protocol-defined level of 127) */
74#define CAN_ERR_CRTL_ACTIVE 0x40 /* recovered to error active state */
74 75
75/* error in CAN protocol (type) / data[2] */76/* error in CAN protocol (type) / data[2] */
76#define CAN_ERR_PROT_UNSPEC 0x00 /* unspecified */77#define CAN_ERR_PROT_UNSPEC 0x00 /* unspecified */