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: <20160628093606.GA30392@shlinux2>
Date:	Tue, 28 Jun 2016 17:36:06 +0800
From:	Peter Chen <hzpeterchen@...il.com>
To:	Stephen Boyd <stephen.boyd@...aro.org>
Cc:	Jun Li <jun.li@....com>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
	Andy Gross <andy.gross@...aro.org>,
	Bjorn Andersson <bjorn.andersson@...aro.org>,
	Neil Armstrong <narmstrong@...libre.com>,
	Arnd Bergmann <arnd@...db.de>, Felipe Balbi <balbi@...nel.org>,
	Peter Chen <peter.chen@....com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Ivan T. Ivanov" <iivanov.xz@...il.com>
Subject: Re: [PATCH 04/21] usb: chipidea: Only read/write OTGSC from one place

On Mon, Jun 27, 2016 at 12:07:54PM -0700, Stephen Boyd wrote:
> Quoting Jun Li (2016-06-27 01:04:39)
> > > diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c index
> > > 03b6743461d1..763a8332b009 100644
> > > --- a/drivers/usb/chipidea/otg.c
> > > +++ b/drivers/usb/chipidea/otg.c
> > > @@ -104,7 +104,32 @@ void ci_handle_vbus_change(struct ci_hdrc *ci)
> > >               usb_gadget_vbus_disconnect(&ci->gadget);
> > >  }
> > > 
> > > -#define CI_VBUS_STABLE_TIMEOUT_MS 5000
> > > +/**
> > > + * Sometimes, it needs to wait register value before going on.
> > > + * Eg, when switch to device mode, the vbus value should be lower
> > > + * than OTGSC_BSV before connects to host.
> > 
> > This should be updated since this API is dedicated for BSV now.
> 
> Ok I've updated it to say:
> 
>   When we switch to device mode, the vbus value should be lower
>   than OTGSC_BSV before connecting to host.
> 
> > 
> > > + *
> > > + * @ci: the controller
> > > + *
> > > + * This function returns an error code if timeout  */ static int
> > > +hw_wait_otgsc_bsv(struct ci_hdrc *ci) {
> > > +     unsigned long elapse = jiffies + msecs_to_jiffies(5000);
> > > +     u32 mask = OTGSC_BSV;
> > > +
> > > +     while (!hw_read_otgsc(ci, mask)) {
> > 
> > Reverse logic, should be:
> > while (hw_read_otgsc(ci, mask)) {
> > 
> 
> Good catch! Thanks.

Besides above, please delete the declaration at ci.h.

-- 

Best Regards,
Peter Chen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ