lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB8PR04MB6795F7E28A9964A121A06140E6D80@DB8PR04MB6795.eurprd04.prod.outlook.com>
Date:   Thu, 16 Apr 2020 09:41:45 +0000
From:   Joakim Zhang <qiangqing.zhang@....com>
To:     "mkl@...gutronix.de" <mkl@...gutronix.de>,
        "linux-can@...r.kernel.org" <linux-can@...r.kernel.org>
CC:     dl-linux-imx <linux-imx@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Michael Walle <michael@...le.cc>
Subject: RE: [PATCH linux-can-next/flexcan] can: flexcan: fix TDC feature


Hi Marc,

How about FlexCAN FD patch set, it is pending for a long time. Many work would base on it, we are happy to see it in upstream mainline ASAP.

Michael Walle also gives out the test-by tag:
	Tested-by: Michael Walle <michael@...le.cc>

Best Regards,
Joakim Zhang

> -----Original Message-----
> From: Joakim Zhang <qiangqing.zhang@....com>
> Sent: 2020年4月16日 17:31
> To: mkl@...gutronix.de; linux-can@...r.kernel.org
> Cc: dl-linux-imx <linux-imx@....com>; netdev@...r.kernel.org
> Subject: [PATCH linux-can-next/flexcan] can: flexcan: fix TDC feature
> 
> We enable TDC feature in flexcan_set_bittiming when loopback off, but disable
> it by mistake after calling flexcan_set_bittiming.
> 
> Signed-off-by: Joakim Zhang <qiangqing.zhang@....com>
> ---
>  drivers/net/can/flexcan.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index
> b16b8abc1c2c..27f4541d9400 100644
> --- a/drivers/net/can/flexcan.c
> +++ b/drivers/net/can/flexcan.c
> @@ -1202,6 +1202,8 @@ static void flexcan_set_bittiming(struct net_device
> *dev)
>  				/* for the TDC to work reliably, the offset has to use
> optimal settings */
>  				reg_fdctrl |=
> FLEXCAN_FDCTRL_TDCOFF(((dbt->phase_seg1 - 1) + dbt->prop_seg + 2) *
>  								    ((dbt->brp -1) + 1));
> +			} else {
> +				reg_fdctrl &= ~FLEXCAN_FDCTRL_TDCEN;
>  			}
>  			priv->write(reg_fdctrl, &regs->fdctrl);
> 
> @@ -1354,7 +1356,6 @@ static int flexcan_chip_start(struct net_device *dev)
>  	/* FDCTRL */
>  	if (priv->can.ctrlmode_supported & CAN_CTRLMODE_FD) {
>  		reg_fdctrl = priv->read(&regs->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE;
> -		reg_fdctrl &= ~FLEXCAN_FDCTRL_TDCEN;
>  		reg_fdctrl &= ~(FLEXCAN_FDCTRL_MBDSR1(0x3) |
> FLEXCAN_FDCTRL_MBDSR0(0x3));
>  		reg_mcr = priv->read(&regs->mcr) & ~FLEXCAN_MCR_FDEN;
>  		reg_ctrl2 = priv->read(&regs->ctrl2) &
> ~FLEXCAN_CTRL2_ISOCANFDEN;
> --
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ