Both devices expect everything from the host as packed Signed-off-by: Gerhard Uttenthaler <uttenthaler@xxxxxxxxxxxxxxxx> --- drivers/net/can/usb/ems_usb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 693ef333ceab..677ed4bc47b9 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -132,7 +132,7 @@ MODULE_LICENSE("GPL v2"); * CPC_MSG_TYPE_CAN_FRAME or CPC_MSG_TYPE_RTR_FRAME or * CPC_MSG_TYPE_EXT_CAN_FRAME or CPC_MSG_TYPE_EXT_RTR_FRAME. */ -struct cpc_can_msg { +struct __packed cpc_can_msg { __le32 id; u8 length; u8 msg[8]; @@ -160,7 +160,7 @@ struct __packed cpc_canfd_msg { #define CPC_FDFLAG_XTD BIT(7) /* Representation of the CAN parameters for the SJA1000 controller */ -struct cpc_sja1000_params { +struct __packed cpc_sja1000_params { u8 mode; u8 acc_code0; u8 acc_code1; @@ -218,20 +218,20 @@ struct cpc_confirm { }; /* Structure for overrun conditions */ -struct cpc_overrun { +struct __packed cpc_overrun { u8 event; u8 count; }; /* SJA1000 CAN errors (compatible to NXP LPC2119) */ -struct cpc_sja1000_can_error { +struct __packed cpc_sja1000_can_error { u8 ecc; u8 rxerr; u8 txerr; }; /* structure for CAN error conditions */ -struct cpc_can_error { +struct __packed cpc_can_error { u8 ecode; struct { @@ -247,7 +247,7 @@ struct cpc_can_error { /* Structure containing RX/TX error counter. This structure is used to request * the values of the CAN controllers TX and RX error counter. */ -struct cpc_can_err_counter { +struct __packed cpc_can_err_counter { u8 rx; u8 tx; }; -- 2.26.2 -- EMS Dr. Thomas Wuensche e.K. Sonnenhang 3 85304 Ilmmuenster HR Ingolstadt, HRA 170106 Phone: +49-8441-490260 Fax : +49-8441-81860 http://www.ems-wuensche.com