2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-06 20:53:54 +08:00
linux-next/drivers/net/can
Marc Kleine-Budde 1c0e78a287 can: mcp251xfd: mcp251xfd_register_get_dev_id(): fix endianness conversion
In mcp251xfd_register_get_dev_id() the device ID register is read with
handcrafted SPI transfers. As all registers, this register is in
little endian. Further it is not naturally aligned in struct
mcp251xfd_map_buf_nocrc::data. However after the transfer the register
content is converted from big endian to CPU endianness not taking care
of being unaligned.

Fix the conversion by converting from little endian to CPU endianness
taking the unaligned source into account.

Side note: So far the register content is 0x0 on all mcp251xfd
compatible chips, and is only used for an informative printk.

Link: https://lore.kernel.org/all/20220627092859.809042-1-mkl@pengutronix.de
Fixes: 55e5b97f00 ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN")
Reviewed-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-07-04 12:51:43 +02:00
..
c_can can: can-dev: remove obsolete CAN LED support 2022-05-19 22:15:51 +02:00
cc770 can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
ctucanfd can: ctucanfd: platform: add missing dependency to HAS_IOMEM 2022-05-23 22:00:06 +02:00
dev can: can-dev: remove obsolete CAN LED support 2022-05-19 22:15:51 +02:00
flexcan can: can-dev: remove obsolete CAN LED support 2022-05-19 22:15:51 +02:00
ifi_canfd can: can-dev: remove obsolete CAN LED support 2022-05-19 22:15:51 +02:00
m_can can: m_can: m_can_{read_fifo,echo_tx_event}(): shift timestamp to full 32 bits 2022-07-04 11:43:00 +02:00
mscan can: can-dev: move to netif_napi_add_weight() 2022-05-19 22:11:28 +02:00
peak_canfd can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
rcar can: rcar_canfd: Fix data transmission failed on R-Car V3U 2022-07-04 11:42:59 +02:00
sja1000 can: can-dev: remove obsolete CAN LED support 2022-05-19 22:15:51 +02:00
softing can: softing: softing_netdev_open(): remove redundant ret variable 2022-02-24 08:26:04 +01:00
spi can: mcp251xfd: mcp251xfd_register_get_dev_id(): fix endianness conversion 2022-07-04 12:51:43 +02:00
usb can: kvaser_usb: kvaser_usb_leaf: fix bittiming limits 2022-07-04 12:45:43 +02:00
at91_can.c can: can-dev: remove obsolete CAN LED support 2022-05-19 22:15:51 +02:00
grcan.c can: grcan: grcan_probe(): remove extra of_node_get() 2022-07-04 11:42:59 +02:00
janz-ican3.c can: can-dev: move to netif_napi_add_weight() 2022-05-19 22:11:28 +02:00
Kconfig can: can-dev: remove obsolete CAN LED support 2022-05-19 22:15:51 +02:00
kvaser_pciefd.c can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
Makefile can: ctucanfd: add support for CTU CAN FD open-source IP core - bus independent part. 2022-04-19 17:12:14 +02:00
pch_can.c can: can-dev: move to netif_napi_add_weight() 2022-05-19 22:11:28 +02:00
slcan.c can: slcan: slc_xmit(): use can_dropped_invalid_skb() instead of manual check 2022-05-16 22:06:51 +02:00
sun4i_can.c can: can-dev: remove obsolete CAN LED support 2022-05-19 22:15:51 +02:00
ti_hecc.c can: can-dev: remove obsolete CAN LED support 2022-05-19 22:15:51 +02:00
vcan.c can: Use netif_rx(). 2022-03-06 11:05:31 +00:00
vxcan.c can: vxcan: vxcan_xmit(): use kfree_skb() instead of kfree() to free skb 2022-03-13 09:45:35 +01:00
xilinx_can.c Revert "can: xilinx_can: Limit CANFD brp to 2" 2022-07-04 11:24:13 +02:00