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]
Date:	Wed, 3 Aug 2016 21:09:28 -0700
From:	Guenter Roeck <groeck@...gle.com>
To:	Chanwoo Choi <cw00.choi@...sung.com>
Cc:	Roger Quadros <rogerq@...com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Felipe Balbi <balbi@...nel.org>, myungjoo.ham@...sung.com,
	Chris Zhong <zyw@...k-chips.com>,
	Guenter Roeck <groeck@...omium.org>, chanwoo@...nel.org,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>
Subject: Re: [PATCH v3 2/6] extcon: Add the support for extcon property
 according to extcon type

On Wed, Aug 3, 2016 at 5:42 PM, Chanwoo Choi <cw00.choi@...sung.com> wrote:
> Hi Roger,
>
> On 2016년 08월 03일 18:46, Roger Quadros wrote:
>> Hi Chanwoo,
>>

[ ... ]

>>>>> +  /*
>>>>> +   * Check whether the external connector is attached.
>>>>> +   * If external connector is detached, the user can not
>>>>> +   * get the property value.
>>>>> +   */
>>>>
>>>> How will this work for USB case? We need to know VBUS and ID states
>>>> even if the USB cable is detached.
>>>
>>> When USB is detached, extcon_get_property return the default value without any operation.
>>> The default value of supported property are 0 (zero). If new property need the differnt default
>>> value, I'll support it.
>>
>> Is the property a property of the connector or of the cable?
>>
>> In my opinion, ID and VBUS are properties of the USB connector and not of
>> the USB cable. So extcon must provide valid status for those properties
>> even if USB cable or USB_HOST cable is detached.
>
> I don't understand about that if USB and USB_HOST are detached,
> how can the USB be operating? As you mentioned that, extcon must
> provide the valid status for both state and properties.
>

Correct. No cable means that the polarity is unknown, and VBUS must not be
active (for USB_HOST), or it can not be active (for USB).

Only question might be EXTCON_PROP_USB_ID; I am not sure I understand
what it is supposed to return. Maybe it would be worthwhile to document it ?

> So, I already mentioned, When USB and USB_HOST are detached,
> extcon return the default value instead of error value.
> I think that it is reasonable. Why is it not a valid?
>

I agree; I don't know what else could be returned if no cable is
attached, even if we wanted to.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ