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] [day] [month] [year] [list]
Message-ID:
 <VI2PR04MB111474E85E1D88DC617AA1ECBE849A@VI2PR04MB11147.eurprd04.prod.outlook.com>
Date: Wed, 9 Jul 2025 07:18:30 +0000
From: Carlos Song <carlos.song@....com>
To: Jan-David Voelkel <jan-david-voelkel@....de>, Oleksij Rempel
	<o.rempel@...gutronix.de>, Andi Shyti <andi.shyti@...nel.org>, Shawn Guo
	<shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>
CC: "kernel@...gutronix.de" <kernel@...gutronix.de>, "festevam@...il.com"
	<festevam@...il.com>, "linux-i2c@...r.kernel.org"
	<linux-i2c@...r.kernel.org>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [EXT] [PATCH] i2c-imx: fix broken GPIO bus recovery due to
 missing recover_bus assignment



> -----Original Message-----
> From: Jan-David Voelkel <jan-david-voelkel@....de>
> Sent: Wednesday, July 9, 2025 2:39 PM
> To: Oleksij Rempel <o.rempel@...gutronix.de>; Andi Shyti
> <andi.shyti@...nel.org>; Shawn Guo <shawnguo@...nel.org>; Sascha Hauer
> <s.hauer@...gutronix.de>
> Cc: kernel@...gutronix.de; festevam@...il.com; linux-i2c@...r.kernel.org;
> imx@...ts.linux.dev; linux-arm-kernel@...ts.infradead.org;
> linux-kernel@...r.kernel.org; Janitawa <jan-david-voelkel@....de>
> Subject: [EXT] [PATCH] i2c-imx: fix broken GPIO bus recovery due to missing
> recover_bus assignment
> 
> [You don't often get email from jan-david-voelkel@....de. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> From: Janitawa <jan-david-voelkel@....de>
> 
> The transition to generic GPIO recovery support removed the driver-specific bus
> recovery logic but failed to assign the required recover_bus callback. This
> prevented the core from enabling recovery, effectively disabling the feature.
> 
> This commit restores the assignment to ensure proper recovery initialization.
> 
> Signed-off-by: Janitawa <jan-david-voelkel@....de>
> ---
>  drivers/i2c/busses/i2c-imx.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index
> c5224d43eea4..421f6da61f00 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -1375,6 +1375,8 @@ static int i2c_imx_init_recovery_info(struct
> imx_i2c_struct *i2c_imx,
>         if (IS_ERR(bri->pinctrl))
>                 return PTR_ERR(bri->pinctrl);
> 
> +       bri->recover_bus = i2c_generic_scl_recovery;
> +
>         i2c_imx->adapter.bus_recovery_info = bri;
> 


Hi,

Have you meet one issue on i2c-imx recovery function?

If bri->recover_bus is NULL and scl_gpios has been added at i2c node.
I notice i2c_generic_scl_recovery will be assigned to bri->recover_bus to help
I2c-imx can support gpio recovery.

Code path in i2c-core-base.c:

> bri->recover_bus = i2c_generic_scl_recovery;
> i2c_gpio_init_generic_recovery()
> i2c_gpio_init_recovery()
> i2c_init_recovery()
> i2c_register_adapter()


Carlos Song

>         return 0;
> --
> 2.43.0
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ