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: <Z2N3Kplgwy8P7STz@google.com>
Date: Thu, 19 Dec 2024 01:30:18 +0000
From: Benson Leung <bleung@...gle.com>
To: Abhishek Pandit-Subedi <abhishekpandit@...omium.org>
Cc: heikki.krogerus@...ux.intel.com, tzungbi@...nel.org,
	linux-usb@...r.kernel.org, chrome-platform@...ts.linux.dev,
	akuchynski@...gle.com, sboyd@...nel.org, pmalani@...omium.org,
	badhri@...gle.com, rdbabiera@...gle.com,
	dmitry.baryshkov@...aro.org, jthies@...gle.com,
	Benson Leung <bleung@...omium.org>,
	Guenter Roeck <groeck@...omium.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 5/8] platform/chrome: cros_ec_typec: Update partner
 altmode active

On Fri, Dec 13, 2024 at 03:35:46PM -0800, Abhishek Pandit-Subedi wrote:
> Mux configuration is often the final piece of mode entry and can be used
> to determine whether a partner altmode is active. When mux configuration
> is done, use the active port altmode's SVID to set the partner active
> field for all partner alt modes.
> 
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@...omium.org>

Reviewed-by: Benson Leung <bleung@...omium.org>

> ---
> 
> Changes in v5:
> - Use list_for_each_entry and simplify conditional statement within
> 
>  drivers/platform/chrome/cros_ec_typec.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
> index ae2f86296954..77f748fc8542 100644
> --- a/drivers/platform/chrome/cros_ec_typec.c
> +++ b/drivers/platform/chrome/cros_ec_typec.c
> @@ -619,6 +619,7 @@ static int cros_typec_configure_mux(struct cros_typec_data *typec, int port_num,
>  	};
>  	struct ec_params_usb_pd_mux_ack mux_ack;
>  	enum typec_orientation orientation;
> +	struct cros_typec_altmode_node *node;
>  	int ret;
>  
>  	ret = cros_ec_cmd(typec->ec, 0, EC_CMD_USB_PD_MUX_INFO,
> @@ -677,6 +678,14 @@ static int cros_typec_configure_mux(struct cros_typec_data *typec, int port_num,
>  			port->mux_flags);
>  	}
>  
> +	/* Iterate all partner alt-modes and set the active alternate mode. */
> +	list_for_each_entry(node, &port->partner_mode_list, list) {
> +		typec_altmode_update_active(
> +			node->amode,
> +			port->state.alt &&
> +				node->amode->svid == port->state.alt->svid);
> +	}
> +
>  mux_ack:
>  	if (!typec->needs_mux_ack)
>  		return ret;
> -- 
> 2.47.1.613.gc27f4b7a9f-goog
> 

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ