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: <aH4M074PasIlWzTQ@kuha.fi.intel.com>
Date: Mon, 21 Jul 2025 12:48:03 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Myrrh Periwinkle <myrrhperiwinkle@...labs.xyz>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH] usb: typec: ucsi: Update power_supply on power role
 change

On Mon, Jul 21, 2025 at 01:32:51PM +0700, Myrrh Periwinkle wrote:
> The current power direction of an USB-C port also influences the
> power_supply's online status, so a power role change should also update
> the power_supply.
> 
> Fixes an issue on some systems where plugging in a normal USB device in
> for the first time after a reboot will cause upower to erroneously
> consider the system to be connected to AC power.
> 
> Cc: stable@...r.kernel.org
> Fixes: 0e6371fbfba3 ("usb: typec: ucsi: Report power supply changes")
> Signed-off-by: Myrrh Periwinkle <myrrhperiwinkle@...labs.xyz>

Reviewed-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>

> ---
>  drivers/usb/typec/ucsi/ucsi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index 01ce858a1a2b3466155db340e213c767d1e79479..8ff31963970bb384e28b460e5307e32cf421396b 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -1246,6 +1246,7 @@ static void ucsi_handle_connector_change(struct work_struct *work)
>  
>  	if (change & UCSI_CONSTAT_POWER_DIR_CHANGE) {
>  		typec_set_pwr_role(con->port, role);
> +		ucsi_port_psy_changed(con);
>  
>  		/* Complete pending power role swap */
>  		if (!completion_done(&con->complete))
> 
> ---
> base-commit: 89be9a83ccf1f88522317ce02f854f30d6115c41
> change-id: 20250721-fix-ucsi-pwr-dir-notify-8a953aab42e5
> 
> Best regards,
> -- 
> Myrrh Periwinkle <myrrhperiwinkle@...labs.xyz>

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ