linux/drivers/net/can
Ji-Ze Hong (Peter Hong) 7f85d11705 usb: f81604: fix struct f81604_int_data size mismatch
The struct f81604_int_data defines 9 bytes of interrupt data:
- Byte 0: Status register (sr)
- Byte 1: Interrupt register (isrc)
- Byte 2: Interrupt enable register (ier)
- Byte 3: Arbitration lost capture (alc)
- Byte 4: Error code capture (ecc)
- Byte 5: Error warning limit register (ewlr)
- Byte 6: RX error counter (rxerr)
- Byte 7: TX error counter (txerr)
- Byte 8: Reserved (val)

The hardware sends exactly 9 bytes for the interrupt endpoint.
However, the struct was defined with __aligned(4) attribute which
caused the compiler to pad the struct to 12 bytes.

This causes a problem in f81604_read_int_callback() where the short
URB check compares urb->actual_length against sizeof(*data). When
sizeof(struct f81604_int_data) is 12 but the hardware only sends 9
bytes, the check fails and valid interrupt messages are discarded.

This results in the driver only being able to transmit once because
the TX complete interrupt is never processed.

Fix this by removing the __aligned(4) attribute so the struct size
matches the actual hardware data size of 9 bytes.

Fixes: 7299b1b39a ("can: usb: f81604: handle short interrupt urb messages properly")
Cc: stable@vger.kernel.org
Reported-by: Dynetrex, Admin <admin@dynetrex.com>
Closes: https://lore.kernel.org/all/A3834A07-5639-4779-844F-C5843DFC3928@dynetrex.com/
Signed-off-by: Ji-Ze Hong (Peter Hong) <peter_hong@fintek.com.tw>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Drew Willey <dwilley@google.com>
Link: https://patch.msgid.link/20260824-f81604-fix-v2-1-fc9be5581394@fintek.com.tw
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2026-10-01 17:13:12 +02:00
..
c_can can: c_can: c_can_chip_config(): keep controller in init mode until bittiming is configured 2026-07-29 12:00:00 +02:00
cc770 can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
ctucanfd can: ctucanfd: add missing MODULE_DEVICE_TABLE() 2026-07-29 11:26:58 +02:00
dev can: dev: init_can_skb(): restore skb header initialization 2026-10-01 17:05:03 +02:00
esd can: convert generic HW timestamp ioctl to ndo_hwtstamp callbacks 2025-10-31 13:12:18 +01:00
flexcan can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
ifi_canfd can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
kvaser_pciefd can: convert generic HW timestamp ioctl to ndo_hwtstamp callbacks 2025-10-31 13:12:18 +01:00
m_can can: m_can: pci: Remove driver_data 2026-08-17 19:20:38 +02:00
mscan can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
peak_canfd can: peak: Modification of references to email accounts being deleted 2026-07-16 09:12:24 +02:00
rcar can: rcar_canfd: change the initializing flow for clocks and resets 2026-07-29 12:00:00 +02:00
rockchip can: rockchip: add RK3588 CAN support 2026-08-17 19:20:37 +02:00
sja1000 can: peak: Modification of references to email accounts being deleted 2026-07-16 09:12:24 +02:00
slcan kernel.h: drop hex.h and update all hex.h users 2026-01-20 19:44:19 -08:00
softing can: softing: fw_parse(): validate firmware record spans 2026-07-29 12:00:00 +02:00
spi Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
usb usb: f81604: fix struct f81604_int_data size mismatch 2026-10-01 17:13:12 +02:00
at91_can.c can: at91_can: Fix memory leak in at91_can_probe() 2026-01-22 16:56:26 +01:00
bxcan.c can: bxcan: Fix a typo error for assign 2025-11-12 19:30:59 +01:00
can327.c kernel.h: drop hex.h and update all hex.h users 2026-01-20 19:44:19 -08:00
dummy_can.c can: dummy_can: dummy_can_init(): fix packet statistics 2026-03-02 10:24:41 +01:00
grcan.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
janz-ican3.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
Kconfig can: vxcan: Kconfig: fix description stating no local echo provided 2026-07-14 10:52:44 +02:00
Makefile can: virtio: Add virtio CAN driver 2026-06-10 02:17:00 -04:00
sun4i_can.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-11-27 12:19:08 -08:00
ti_hecc.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00
vcan.c can: propagate CAN device capabilities via ml_priv 2026-01-15 09:52:04 +01:00
virtio_can.c can: virtio: Add virtio CAN driver 2026-06-10 02:17:00 -04:00
vxcan.c can: fix unique skb identifier regression under RPS 2026-10-01 17:05:03 +02:00
xilinx_can.c can: treewide: remove can_change_mtu() 2025-10-17 09:57:13 +02:00