On 16.01.2023 11:13:18, Stefan Althöfer wrote: > the driver logs this kind of annoying messages: > Jan 14 04:10:48 raspberrypi kernel: [54876.751957] mcp251xfd spi6.0 can1: CRC read error at address 0x0010 (length=4, data=00 4b 01 00, CRC=0xe146) retrying. > > Unless DEBUG is active, I don't think that it is justified to print every single > SPI CRC issue in detail to the logs: > - The errors are due to chip errata > - You cannot deduct that you have software/hardware issue from those errors > - As you do not know how the data should have been, you cant do > diagnostic (single-bit vs multi-bit errors or the like) > > So far I have only seen these errors for access to register 0x0010 and > rarely for 0x0000, probably because those registers have dynamic content. ACK > Nevertheless, diagnostic for SPI CRC errors might still be useful. I > suggest to add driver proprietary static counters in /sys for that: > > .../can0/spi_crc_dynamic_data (for 0x000, 0x0010) to avoid the word "expected" > .../can0/spi_crc_static_data (for all others) The networking stack has a proper interface for network interface statistics, better make use of these. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: PGP signature