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: <c48d6d73-73d6-4df6-8e9c-c8f2ecdd654a@app.fastmail.com>
Date: Tue, 18 Feb 2025 11:57:55 -0500
From: "Mark Pearson" <mpearson-lenovo@...ebb.ca>
To: "Fedor Pchelkin" <boddah8794@...il.com>,
 "Heikki Krogerus" <heikki.krogerus@...ux.intel.com>,
 "Christian A. Ehrhardt" <lk@...e.de>
Cc: "Greg KH" <gregkh@...uxfoundation.org>,
 "Dmitry Baryshkov" <dmitry.baryshkov@...aro.org>,
 "Benson Leung" <bleung@...omium.org>, "Jameson Thies" <jthies@...gle.com>,
 "Saranya Gopal" <saranya.gopal@...el.com>, linux-usb@...r.kernel.org,
 linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH RFC 2/2] usb: typec: ucsi: increase timeout for PPM reset
 operations

Hi  Fedor,

On Thu, Feb 6, 2025, at 1:43 PM, Fedor Pchelkin wrote:
> It is observed that on some systems an initial PPM reset during the boot
> phase can trigger a timeout:
>
> [    6.482546] ucsi_acpi USBC000:00: failed to reset PPM!
> [    6.482551] ucsi_acpi USBC000:00: error -ETIMEDOUT: PPM init failed
>
> Still, increasing the timeout value, albeit being the most straightforward
> solution, eliminates the problem: the initial PPM reset may take up to
> ~8000-10000ms on some Lenovo laptops. When it is reset after the above
> period of time (or even if ucsi_reset_ppm() is not called overall), UCSI
> works as expected.
>
> Moreover, if the ucsi_acpi module is loaded/unloaded manually after the
> system has booted, reading the CCI values and resetting the PPM works
> perfectly, without any timeout. Thus it's only a boot-time issue.
>
> The reason for this behavior is not clear but it may be the consequence
> of some tricks that the firmware performs or be an actual firmware bug.
> As a workaround, increase the timeout to avoid failing the UCSI
> initialization prematurely.
>

Could you let me know which Lenovo platform(s) you see the issue on?

I don't have any concerns with the patch below, but if the platform is in the Linux program I can reach out to the FW team and try to determine if there's an expected time needed (and how close we are to it).

Thanks

Mark

> Fixes: b1b59e16075f ("usb: typec: ucsi: Increase command completion 
> timeout value")
> Cc: stable@...r.kernel.org
> Signed-off-by: Fedor Pchelkin <boddah8794@...il.com>
> ---
>  drivers/usb/typec/ucsi/ucsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/ucsi/ucsi.c 
> b/drivers/usb/typec/ucsi/ucsi.c
> index 0fe1476f4c29..7a56d3f840d7 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -25,7 +25,7 @@
>   * difficult to estimate the time it takes for the system to process 
> the command
>   * before it is actually passed to the PPM.
>   */
> -#define UCSI_TIMEOUT_MS		5000
> +#define UCSI_TIMEOUT_MS		10000
> 
>  /*
>   * UCSI_SWAP_TIMEOUT_MS - Timeout for role swap requests
> -- 
> 2.48.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ