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: <0adff11c-4836-4035-39a7-1cd2ea3ff74d@roeck-us.net>
Date:   Fri, 7 Sep 2018 05:55:53 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        "Angus Ainslie (Purism)" <angus@...ea.ca>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: typec: don't disable sink or source on
 initialization

On 09/07/2018 03:34 AM, Heikki Krogerus wrote:
> +Guenter
> 
> On Thu, Sep 06, 2018 at 01:26:44PM -0600, Angus Ainslie (Purism) wrote:
>> If the board is being powered by USB disabling the source and sink
>> can remove power from the board. Default to source and sink enabled.
>>

Seems to me that might violate the specification, and cause trouble for systems
where vbus has to be off initially. It may be better to provide this kind of
information as configuration parameter instead of imposing it on everyone.

Guenter

>> Signed-off-by: Angus Ainslie (Purism) <angus@...ea.ca>
>> ---
>>   drivers/usb/typec/tcpm.c | 8 +++++---
>>   1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c
>> index ca7bedb46f7f..a1b819cf31da 100644
>> --- a/drivers/usb/typec/tcpm.c
>> +++ b/drivers/usb/typec/tcpm.c
>> @@ -2462,9 +2462,11 @@ static int tcpm_init_vbus(struct tcpm_port *port)
>>   {
>>   	int ret;
>>   
>> -	ret = port->tcpc->set_vbus(port->tcpc, false, false);
>> -	port->vbus_source = false;
>> -	port->vbus_charge = false;
>> +	/* default to source and sink enabled in case USB is our only power
>> +	 * source */

I am personally in favor of standard multi-line comments.

>> +	ret = port->tcpc->set_vbus(port->tcpc, true, true);
>> +	port->vbus_source = true;
>> +	port->vbus_charge = true;
>>   	return ret;
>>   }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ