linux-stable/drivers/net/can
Marc Kleine-Budde 25386c9a01 can: mcp251xfd: mcp251xfd_regmap_crc_read(): ignore CRC error only if solely OSC register is read
MCP251XFD_REG_OSC is the first register the driver reads from. The
chip may be in deep sleep and the SPI transfer (i.e. the assertion of
the CS) will wake the chip up. This takes about 3ms. The CRC of this
transfer is wrong, or there isn't any chip at all, in this case the
CRC will be wrong, too. The driver ignores the CRC error and returns
the read data to the caller.

To avoid any confusion, this patch changes the
mcp251xfd_regmap_crc_read() function to only ignore the CRC error if
solely the OSC register is read. So when reading more than the OSC
registers at once, CRC errors are not ignored.

Link: https://lore.kernel.org/all/20220207131047.282110-3-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-02-24 08:26:04 +01:00
..
c_can can: c_can: ethtool: use default drvinfo 2022-02-24 08:26:04 +01:00
cc770 can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
dev can: bittiming: mark function arguments and local variables as const 2022-02-24 08:26:03 +01:00
flexcan can: flexcan: mark RX via mailboxes as supported on MCF5441X 2022-01-24 18:27:43 +01:00
ifi_canfd can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
m_can can: tcan4x5x: regmap: fix max register value 2022-01-24 18:27:43 +01:00
mscan can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
peak_canfd can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
rcar Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-01-09 17:00:17 -08:00
sja1000 can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
softing can: softing: softing_netdev_open(): remove redundant ret variable 2022-02-24 08:26:04 +01:00
spi can: mcp251xfd: mcp251xfd_regmap_crc_read(): ignore CRC error only if solely OSC register is read 2022-02-24 08:26:04 +01:00
usb can: etas_es58x: use BITS_PER_TYPE() instead of manual calculation 2022-02-24 08:26:04 +01:00
at91_can.c can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
grcan.c can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
janz-ican3.c can: janz-ican3: initialize dlc variable 2022-01-08 20:17:41 +01:00
Kconfig can: flexcan: update Kconfig to enable coldfire 2021-07-25 11:36:29 +02:00
kvaser_pciefd.c can: do not increase rx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
led.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile can: flexcan: move driver into separate sub directory 2022-01-08 20:17:42 +01:00
pch_can.c can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
slcan.c TTY/Serial driver updates for 5.17-rc1 2022-01-12 11:21:52 -08:00
sun4i_can.c can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
ti_hecc.c can: ti_hecc: ti_hecc_probe(): use platform_get_irq() to get the interrupt 2022-01-05 12:08:19 +01:00
vcan.c can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
vxcan.c can: do not increase tx_bytes statistics for RTR frames 2022-01-05 12:09:05 +01:00
xilinx_can.c can: xilinx_can: Add check for NAPI Poll function 2022-02-24 08:26:04 +01:00