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: <ZZfSwGokdjD1YdPX@kuha.fi.intel.com>
Date: Fri, 5 Jan 2024 12:57:16 +0200
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Jai Luthra <j-luthra@...com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Javier Carrasco <javier.carrasco@...fvision.net>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	rogerq@...nel.org, r-gunasekaran@...com, vigneshr@...com,
	d-gole@...com
Subject: Re: [PATCH] usb: typec: tipd: Separate reset for TPS6598x

On Fri, Jan 05, 2024 at 02:36:54PM +0530, Jai Luthra wrote:
> Some platforms like SK-AM62, SK-AM62A cannot boot up to prompt if
> TPS6598x is cold-reset during unconditionally on probe failures by
> sending "GAID" sequence.
> 
> The probe can fail initially because USB0 remote-endpoint may not be
> probed yet, which defines the usb-role-switch property.
> 
> Fixes: d49f90822015 ("usb: typec: tipd: add init and reset functions to tipd_data")
> Closes: https://lore.kernel.org/linux-usb/vmngazj6si7xxss7txenezkcukqje2glhvvs7ipdcx3vjiqvlk@ohmmhhhlryws/
> Signed-off-by: Jai Luthra <j-luthra@...com>

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

> ---
> Boot-logs with this patch applied:
> https://gist.github.com/jailuthra/b66d5722090ce1fbc2886986e53640f7
> ---
>  drivers/usb/typec/tipd/core.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index a956eb976906..8ba2aa05db51 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -1223,11 +1223,16 @@ static int cd321x_reset(struct tps6598x *tps)
>  	return 0;
>  }
>  
> -static int tps6598x_reset(struct tps6598x *tps)
> +static int tps25750_reset(struct tps6598x *tps)
>  {
>  	return tps6598x_exec_cmd_tmo(tps, "GAID", 0, NULL, 0, NULL, 2000, 0);
>  }
>  
> +static int tps6598x_reset(struct tps6598x *tps)
> +{
> +	return 0;
> +}
> +
>  static int
>  tps25750_register_port(struct tps6598x *tps, struct fwnode_handle *fwnode)
>  {
> @@ -1545,7 +1550,7 @@ static const struct tipd_data tps25750_data = {
>  	.trace_status = trace_tps25750_status,
>  	.apply_patch = tps25750_apply_patch,
>  	.init = tps25750_init,
> -	.reset = tps6598x_reset,
> +	.reset = tps25750_reset,
>  };
>  
>  static const struct of_device_id tps6598x_of_match[] = {
> 
> ---
> base-commit: e2425464bc87159274879ab30f9d4fe624b9fcd2
> change-id: 20240105-next-tps-fix-904ed92bc1cc
> 
> Best regards,
> -- 
> Jai Luthra <j-luthra@...com>

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ