[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB8PR04MB6795D95B0B9905C4B25D764EE63E0@DB8PR04MB6795.eurprd04.prod.outlook.com>
Date: Thu, 17 Sep 2020 02:28:18 +0000
From: Joakim Zhang <qiangqing.zhang@....com>
To: Marc Kleine-Budde <mkl@...gutronix.de>,
Vladimir Oltean <olteanv@...il.com>
CC: "wg@...ndegger.com" <wg@...ndegger.com>,
Pankaj Bansal <pankaj.bansal@....com>,
"Pankaj Bansal (OSS)" <pankaj.bansal@....nxp.com>,
"linux-can@...r.kernel.org" <linux-can@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: canfdtest on flexcan loopback
> -----Original Message-----
> From: Marc Kleine-Budde <mkl@...gutronix.de>
> Sent: 2020年9月16日 20:01
> To: Vladimir Oltean <olteanv@...il.com>
> Cc: wg@...ndegger.com; Pankaj Bansal <pankaj.bansal@....com>; Pankaj
> Bansal (OSS) <pankaj.bansal@....nxp.com>; linux-can@...r.kernel.org;
> Joakim Zhang <qiangqing.zhang@....com>; linux-kernel@...r.kernel.org;
> Vladimir Oltean <vladimir.oltean@....com>
> Subject: Re: canfdtest on flexcan loopback
>
> On 9/16/20 1:45 PM, Vladimir Oltean wrote:
> > On Wed, Sep 16, 2020 at 01:32:49PM +0200, Marc Kleine-Budde wrote:
> >> Which driver are you using? The mainline driver only uses one TX buffer.
> >
> > Are there multiple flexcan drivers in circulation? Yes, the mainline
> > driver with a single priv->tx_mb.
>
> I assume nxp has several patches on their kernels. Are you using the mainline
> kernel or the one that's provided by nxp?
Hi Marc, Vladimir,
Yes, Vladimir uses kernel provided by NXP, I also help try to look into this issue, but it can't be reproduced on i.MX platforms.
Our local flexcan driver is almost cherry-picked from linux-can-next/flexcan branch to implement CAN FD mode, which is a version that cleaned up by you before.
I confirm that we still use single TX mailbox to send frames, per my understanding, reorder should not occur here.
According to Vladimir's description, exactly it happens:
"I have added trace points to the end of the flexcan_start_xmit function, which print the entire skb, and the frames appear to be written to the TX message buffer in the correct order. They are seen, however, in the incorrect order on the wire."
Since Vladimir only test Classic mode, he can turn to 5.4 upstream kernel to see if this reorder issue also can be reproduced. @Vladimir Oltean, could you please have a try?
To easy the test, I think you only need replace below several files at local side, then use "fsl,ls1021ar2-flexcan" compatible string in dts.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/can/flexcan.c?h=v5.4.65
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/can/rx-offload.c?h=v5.4.65
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/linux/can/rx-offload.h?h=v5.4.65
If it can't work, suggest to use 5.4 upstream kernel to reproduce this issue.
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 |
Powered by blists - more mailing lists