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: <20230726-deflected-slider-8e928de8616a-mkl@pengutronix.de>
Date: Wed, 26 Jul 2023 08:35:32 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: haibo.chen@....com
Cc: robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
	conor+dt@...nel.org, shawnguo@...nel.org, s.hauer@...gutronix.de,
	wg@...ndegger.com, kernel@...gutronix.de, linux-imx@....com,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, devicetree@...r.kernel.org,
	linux-can@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] can: flexcan: remove the auto stop mode for IMX93

On 26.07.2023 11:50:32, haibo.chen@....com wrote:
> From: Haibo Chen <haibo.chen@....com>
> 
> IMX93 A0 chip involve the internal q-channel handshake in LPCG and
> CCM to automatically handle the Flex-CAN IPG STOP signal. Only after
> FLEX-CAN enter stop mode then can support the self-wakeup feature.
> 
> But meet issue when do the continue system PM stress test. When config
> the CAN as wakeup source, the first time after system suspend, any data
> on CAN bus can wakeup the system, this is as expect. But the second time
> when system suspend, data on CAN bus can't wakeup the system. If continue
> this test, we find in odd time system enter suspend, CAN can wakeup the
> system, but in even number system enter suspend, CAN can't wakeup the
> system.
> 
> IC find a bug in the auto stop mode logic when handle the q-channel, and
> can't fix it easily. So for the new imx93 A1, IC drop the auto stop mode
> and involve the GPR to support stop mode (used before). IC define a bit
> in GPR which can trigger the IPG STOP signal to Flex-CAN, let it go into
> stop mode.
> 
> Now NXP claim to drop IMX93 A0, and only support IMX93 A1. So this patch
> remove the auto stop mode, and add flag FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR
> to imx93.
> 
> Signed-off-by: Haibo Chen <haibo.chen@....com>
> ---
>  drivers/net/can/flexcan/flexcan-core.c | 37 ++++----------------------
>  drivers/net/can/flexcan/flexcan.h      |  2 --
>  2 files changed, 5 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c
> index ff0fc18baf13..a3f3a9c909be 100644
> --- a/drivers/net/can/flexcan/flexcan-core.c
> +++ b/drivers/net/can/flexcan/flexcan-core.c
> @@ -348,7 +348,7 @@ static struct flexcan_devtype_data fsl_imx8mp_devtype_data = {
>  static struct flexcan_devtype_data fsl_imx93_devtype_data = {
>  	.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
>  		FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_RX_MAILBOX |
> -		FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_AUTO_STOP_MODE |
> +		FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR |

AFAICS this change breaks systems with old device trees (i.e. without
"fsl,stop-mode") and new kernels. The flexcan driver will not probe
anymore.

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ