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:	Mon, 11 Apr 2016 16:26:18 +0300
From:	Felipe Balbi <balbi@...nel.org>
To:	Roger Quadros <rogerq@...com>
Cc:	tony@...mide.com, Joao.Pinto@...opsys.com,
	sergei.shtylyov@...entembedded.com, peter.chen@...escale.com,
	jun.li@...escale.com, grygorii.strashko@...com,
	yoshihiro.shimoda.uh@...esas.com, nsekhar@...com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-omap@...r.kernel.org
Subject: Re: [PATCH v6 03/10] usb: dwc3: omap: Pass VBUS and ID events transparently


Hi,

Roger Quadros <rogerq@...com> writes:
> On 11/04/16 15:18, Felipe Balbi wrote:
>> 
>> Hi,
>> 
>> Roger Quadros <rogerq@...com> writes:
>>> Don't make any decisions regarding VBUS session based on ID
>>> status. That is best left to the OTG core.
>> 
>> what about builds who don't want OTG and/or dual-role ?
>> 
>>> Pass ID and VBUS events independent of each other so that OTG
>>> core knows exactly what to do.
>>>
>>> This makes dual-role with extcon work with OTG irq on OMAP platforms.
>>>
>>> Signed-off-by: Roger Quadros <rogerq@...com>
>>> ---
>>>  drivers/usb/dwc3/dwc3-omap.c | 15 ++++++---------
>>>  1 file changed, 6 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
>>> index 51ca098..c9b918d 100644
>>> --- a/drivers/usb/dwc3/dwc3-omap.c
>>> +++ b/drivers/usb/dwc3/dwc3-omap.c
>>> @@ -233,19 +233,14 @@ static void dwc3_omap_set_mailbox(struct dwc3_omap *omap,
>>>  		}
>>>  
>>>  		val = dwc3_omap_read_utmi_ctrl(omap);
>>> -		val &= ~(USBOTGSS_UTMI_OTG_CTRL_IDDIG
>>> -				| USBOTGSS_UTMI_OTG_CTRL_VBUSVALID
>>> -				| USBOTGSS_UTMI_OTG_CTRL_SESSEND);
>>> -		val |= USBOTGSS_UTMI_OTG_CTRL_SESSVALID
>>> -				| USBOTGSS_UTMI_OTG_CTRL_POWERPRESENT;
>>> +		val &= ~USBOTGSS_UTMI_OTG_CTRL_IDDIG;
>> 
>> this creates the possibility of having a USB peripheral with VBUS_VALID,
>> right 
>
> Sorry, I didn't get what you meant.

if you're touching these bits independently from each other, won't you
have a situation where you notify IDFLOAT but don't notify that VBUS is
off ?

-- 
balbi

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ