RE: [PATCH 6/6] can: flexcan: fix ECC function on LS1021A/LX2160A

From: Joakim Zhang
Date: Fri Oct 16 2020 - 02:49:54 EST


Hi Marc,

> -----Original Message-----
> From: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
> Sent: 2020年10月16日 14:05
> To: Joakim Zhang <qiangqing.zhang@xxxxxxx>; robh+dt@xxxxxxxxxx;
> shawnguo@xxxxxxxxxx; s.hauer@xxxxxxxxxxxxxx
> Cc: kernel@xxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>; Ying Liu
> <victor.liu@xxxxxxx>; Peng Fan <peng.fan@xxxxxxx>;
> linux-can@xxxxxxxxxxxxxxx; Pankaj Bansal <pankaj.bansal@xxxxxxx>;
> netdev@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH 6/6] can: flexcan: fix ECC function on LS1021A/LX2160A
>
> On 10/16/20 3:43 PM, Joakim Zhang wrote:
> > After double check with Layerscape CAN owner (Pankaj Bansal), confirm
> > that LS1021A doesn't support ECC, and LX2160A indeed supports ECC.
> >
> > For SoCs with ECC supported, even use FLEXCAN_QUIRK_DISABLE_MECR
> quirk
> > to disable non-correctable errors interrupt and freeze mode, had
> > better use FLEXCAN_QUIRK_SUPPORT_ECC quirk to initialize all memory.
> >
> > Signed-off-by: Joakim Zhang <qiangqing.zhang@xxxxxxx>
> > ---
> > drivers/net/can/flexcan.c | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> > index a55ea8f27f7c..7b0eb608fc9d 100644
> > --- a/drivers/net/can/flexcan.c
> > +++ b/drivers/net/can/flexcan.c
> > @@ -219,7 +219,7 @@
> > * MX8MP FlexCAN3 03.00.17.01 yes yes no
> yes yes yes
> > * VF610 FlexCAN3 ? no yes no
> yes yes? no
> > * LS1021A FlexCAN2 03.00.04.00 no yes no
> no yes no
> > - * LX2160A FlexCAN3 03.00.23.00 no yes no
> no yes yes
> > + * LX2160A FlexCAN3 03.00.23.00 no yes no
> yes yes yes
> > *
> > * Some SOCs do not have the RX_WARN & TX_WARN interrupt line
> connected.
> > */
> > @@ -408,19 +408,19 @@ static struct flexcan_devtype_data
> > fsl_imx8mp_devtype_data = { static const struct flexcan_devtype_data
> fsl_vf610_devtype_data = {
> > .quirks = FLEXCAN_QUIRK_DISABLE_RXFG |
> FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
> > FLEXCAN_QUIRK_DISABLE_MECR |
> FLEXCAN_QUIRK_USE_OFF_TIMESTAMP |
> > - FLEXCAN_QUIRK_BROKEN_PERR_STATE,
> > + FLEXCAN_QUIRK_BROKEN_PERR_STATE |
> FLEXCAN_QUIRK_SUPPORT_ECC,
>
> You add the missing ECC init for vf610, but don't mention it in the patch subject
> nor description. Please make this a seperate patch and add a Fixes: line.
OK.

> > };
> >
> > static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = {
> > .quirks = FLEXCAN_QUIRK_DISABLE_RXFG |
> FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
> > - FLEXCAN_QUIRK_DISABLE_MECR |
> FLEXCAN_QUIRK_BROKEN_PERR_STATE |
> > - FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
> > + FLEXCAN_QUIRK_BROKEN_PERR_STATE |
> FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
> > };
>
> Please make this a seperate patch, too, along with the Fixes line.
OK.

Best Regards,
Joakim Zhang
> > static const struct flexcan_devtype_data fsl_lx2160a_r1_devtype_data = {
> > .quirks = FLEXCAN_QUIRK_DISABLE_RXFG |
> FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
> > FLEXCAN_QUIRK_DISABLE_MECR |
> FLEXCAN_QUIRK_BROKEN_PERR_STATE |
> > - FLEXCAN_QUIRK_USE_OFF_TIMESTAMP |
> FLEXCAN_QUIRK_SUPPORT_FD,
> > + FLEXCAN_QUIRK_USE_OFF_TIMESTAMP |
> FLEXCAN_QUIRK_SUPPORT_FD |
> > + FLEXCAN_QUIRK_SUPPORT_ECC,
> > };
> >
> > static const struct can_bittiming_const flexcan_bittiming_const = {
> >
>
>
> --
> 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 |