Hello, On 03/28/2011 04:05 PM, Georgy Lukonin wrote: > Currently there is a problem if two programs trying to access the socket. > In my case the one program sends only few packets over the CAN. The > another one sends a huge amount of packets. This causes a frequently > reset of the device and the lost of messages in the buffer.
Which Linux Version are you using? Which hardware do you have? What's the bitrate of the CAN bus? Who resets the device? How do you know that the device has been reset? Which messages are lost? The packages the at91 should rx or tx? > I get this messages: > > can: chip_stopped > can: at91_close > at91_can at91_can: bitrate error 0.3% > at91_can at91_can: writing AT91_BR: 0x000a0122 > can: chip_started! > can: at91_open Have you made any modifications to the kernel? I cannot find any code in v2.6.38 that prints "chip_stopped" or "chip_started!". > What is the best way to avoid this behaviour? How can I check if there > are any free buffers available? Which buffers do you mean? RX or TX. The mainline driver has no interface to get this information. However you can add a debugfs interface for this. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
