Re: Wake up issue about Flexcan driver in v5.4 kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/12/19 12:02 PM, Joakim Zhang wrote:
>> I suggest to set a flag in the suspend handler and evaluate the flag in the
>> interrupt handler. If the flag is set, we have to ignore the timestamp.
> 
> Not quite understand, could you explain more? Thanks 😉

With a wakeup to IRQ latency higher than the time stamp counter overflow
time we cannot rely on the timestamps of the CAN frames in the first IRQ
handler run after wakeup.

My proposal is to set a flag in the suspend handler, e.g.
priv->ignore_timestamp = true;

For now make a copy of
    can_rx_offload_irq_offload_timestamp()
call it
    can_rx_offload_irq_offload_ignore_timestamp()
replace
    __skb_queue_add_sort(&skb_queue, skb, can_rx_offload_compare);
by
    skb_queue_tail(&offload->skb_queue, skb);

In the IRQ handler, check if the flag is set, call
    can_rx_offload_irq_offload_ignore_timestamp()
and unset the flag.

Check if that helps.

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: OpenPGP digital signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux