> -----Original Message----- > From: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> > Sent: 2019ๅนด11ๆ12ๆฅ 18:46 > To: Joakim Zhang <qiangqing.zhang@xxxxxxx>; sean@xxxxxxxxxx; > linux-can@xxxxxxxxxxxxxxx > Subject: Re: Wake up issue about Flexcan driver in v5.4 kernel > > On 11/12/19 10:53 AM, Joakim Zhang wrote: > >>>> Yes, these timestamps are all over the place. It's due to the "big" > >>>> gap of 100ms between the CAN frames. What's the configured bitrate > >>>> of > >> your bus? > >>> > >>> ip link set can0 up type can bitrate 1000000 > >> > >> With 1Mbit/s you have overruns every 65ms (worst case). > > > > Yes. What's the bitrate you want me have a test? > > Don't know, all :) > > > I have a question, mailbox read has taken counter overflow into > > consideration, why does overflow quite often will cause the frame > > disorder? > > If you send packet with 100ms delay and have 6 packets in the mailboxes, this > means you have more than 10 counter overflows. This means it's impossible to > sort the CAN frames by timestamp. Oh... Understood, thanks a lot! > Why does the wakeup from first packet to IRQ handler take so long? I don't know, I used the upstream driver, in our local 4.19, only 1 packet in the mailbox when resume back. > 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 ๐ Best Regards, Joakim Zhang > 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 |