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: <9bbf8021-9cb7-4daa-837d-0501e5230135@roeck-us.net>
Date:   Fri, 8 Dec 2023 09:00:25 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Kyle Tso <kyletso@...gle.com>, heikki.krogerus@...ux.intel.com,
        gregkh@...uxfoundation.org
Cc:     badhri@...gle.com, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org
Subject: Re: [PATCH v1] usb: typec: tcpm: Query Source partner for FRS
 capability only if it is DRP

On 12/4/23 23:47, Kyle Tso wrote:
> Source-only port partner will always respond NOT_SUPPORTED to
> GET_SINK_CAP. Avoid this redundant AMS by bailing out querying the FRS
> capability if the Source port partner is not DRP.
> 
> Signed-off-by: Kyle Tso <kyletso@...gle.com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>   drivers/usb/typec/tcpm/tcpm.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 50cbc52386b3..192c103e0d10 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -4401,7 +4401,8 @@ static void run_state_machine(struct tcpm_port *port)
>   			tcpm_set_current_limit(port, tcpm_get_current_limit(port), 5000);
>   		tcpm_swap_complete(port, 0);
>   		tcpm_typec_connect(port);
> -		mod_enable_frs_delayed_work(port, 0);
> +		if (port->pd_capable && port->source_caps[0] & PDO_FIXED_DUAL_ROLE)
> +			mod_enable_frs_delayed_work(port, 0);
>   		tcpm_pps_complete(port, port->pps_status);
>   
>   		if (port->ams != NONE_AMS)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ