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-next>] [day] [month] [year] [list]
Message-ID: <5ed76217-c30e-4b9a-9462-0dbd859b2a79@wanadoo.fr>
Date: Thu, 12 Sep 2024 19:10:50 +0200
From: Marion & Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Ard Biesheuvel <ardb+git@...gle.com>, linux-i2c@...r.kernel.org
Cc: Ard Biesheuvel <ardb@...nel.org>, stable@...r.kernel.org,
 Andi Shyti <andi.shyti@...nel.org>,
 Andy Shevchenko <andy.shevchenko@...il.com>, Wolfram Sang <wsa@...nel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 Kernel Janitors <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH] i2c/synquacer: Deal with optional PCLK correctly

(trying to merge t and cc fields from Ard's and Andy's messages)


Le 12/09/2024 à 12:46, Ard Biesheuvel a écrit :
> From: Ard Biesheuvel <ardb@...nel.org>
>
> ACPI boot does not provide clocks and regulators, but instead, provides
> the PCLK rate directly, and enables the clock in firmware. So deal
> gracefully with this.
>
> Fixes: 55750148e559 ("i2c: synquacer: Fix an error handling path in synquacer_i2c_probe()")

Hi,

If that matters, I'm not sure that the Fixes tag is correct.

IIUC, either it is a new functionally that is added (now it works with 
ACPI...), or if considered as a fix, then I think that it is linked to 
commit 0d676a6c4390 ("i2c: add support for Socionext SynQuacer I2C 
controller").

I don't think that 55750148e559 introduced a regression. The issue seems 
to be there since the beginning. Agreed?

If yes, then it may be needed to backport it in older kernels too.

CJ

> Cc: <stable@...r.kernel.org>
> Cc: Andi Shyti <andi.shyti@...nel.org>
> Cc: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
> ---
> https://lore.kernel.org/all/CAMj1kXFH+zB_YuUS+vaEpguhuVGLYbQw55VNDCxnBfSPe6b-nw@mail.gmail.com/T/#u
>
>   drivers/i2c/busses/i2c-synquacer.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-synquacer.c b/drivers/i2c/busses/i2c-synquacer.c
> index 4eccbcd0fbfc..bbb9062669e4 100644
> --- a/drivers/i2c/busses/i2c-synquacer.c
> +++ b/drivers/i2c/busses/i2c-synquacer.c
> @@ -550,12 +550,13 @@ static int synquacer_i2c_probe(struct platform_device *pdev)
>   	device_property_read_u32(&pdev->dev, "socionext,pclk-rate",
>   				 &i2c->pclkrate);
>   
> -	pclk = devm_clk_get_enabled(&pdev->dev, "pclk");
> +	pclk = devm_clk_get_optional_enabled(&pdev->dev, "pclk");
>   	if (IS_ERR(pclk))
>   		return dev_err_probe(&pdev->dev, PTR_ERR(pclk),
>   				     "failed to get and enable clock\n");
>   
> -	i2c->pclkrate = clk_get_rate(pclk);
> +	if (pclk)
> +		i2c->pclkrate = clk_get_rate(pclk);
>   
>   	if (i2c->pclkrate < SYNQUACER_I2C_MIN_CLK_RATE ||
>   	    i2c->pclkrate > SYNQUACER_I2C_MAX_CLK_RATE)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ