Re: ti_hecc: canfdtest rx freeze
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2017-02-20 10:46:40
Attachments
- signature.asc [application/pgp-signature] 488 bytes
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2017-02-20 10:46:40
On 02/20/2017 11:04 AM, Yegor Yefremov wrote:
quoted
Does the ti_hecc core have a RX timestamp per mailbox? Then you can make use of the rx_offload helper.Yes, it does. See Section "23.10.2.2 Message Object Time Stamp Registers (CANMOTS)". What drivers use such a feature? Only PEAK so far? /* convert timestamp into kernel time */ peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv); hwts = skb_hwtstamps(skb); hwts->hwtstamp = timeval_to_ktime(tv); Why should this help to resolve freezing issue?
David Jander and me created the rx-offload helper, which abstracts the reading of the mailboxes for controllers with real fifos or mailboxes which are filled in a particular order. The timestamp of the mailbox is used to sort the CAN frames into chronological order. The flexcan driver has been ported to that helper, see: 30164759db1b can: flexcan: make use of rx-offload's irq_offload_fifo b3cf53e988ce can: flexcan: add support for timestamp based rx-offload 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 |