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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160419015622.GH4477@shlinux2.ap.freescale.net>
Date:	Tue, 19 Apr 2016 09:56:22 +0800
From:	Peter Chen <hzpeterchen@...il.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Roger Quadros <rogerq@...com>, Felipe Balbi <balbi@...nel.org>,
	gregkh@...uxfoundation.org, peter.chen@...escale.com,
	dan.j.williams@...el.com, jun.li@...escale.com,
	mathias.nyman@...ux.intel.com, tony@...mide.com,
	Joao.Pinto@...opsys.com, abrestic@...omium.org,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-omap@...r.kernel.org
Subject: Re: [PATCH v6 01/12] usb: hcd: Initialize hcd->flags to 0

On Mon, Apr 18, 2016 at 10:11:29AM -0400, Alan Stern wrote:
> On Mon, 18 Apr 2016, Peter Chen wrote:
> 
> > On Wed, Apr 06, 2016 at 09:32:22AM +0300, Roger Quadros wrote:
> > > On 06/04/16 09:09, Felipe Balbi wrote:
> > > > 
> > > > Hi,
> > > > 
> > > > Roger Quadros <rogerq@...com> writes:
> > > >> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
> > > >> index 2ca2cef..6b1930d 100644
> > > >> --- a/drivers/usb/core/hcd.c
> > > >> +++ b/drivers/usb/core/hcd.c
> > > >> @@ -2706,6 +2706,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
> > > >>  	int retval;
> > > >>  	struct usb_device *rhdev;
> > > >>  
> > > >> +	hcd->flags = 0;
> > > > 
> > > > seems like this would make more sense in usb_del_hcd() instead.
> > > > 
> > > 
> > > OK, I'll move it there.
> > > 
> > 
> > It depends on Alan's comments, whether only usb_add_hcd/usb_del_hcd
> > pair can be called repeat. If Alan acks it, I have no idea for it.
> 
> Most of the host controller drivers were not written with this in mind,
> but I think it would be a good thing to allow.  It would speed up the
> host/device role switches.
> 
> This might mean we need to fix up several drivers to make them work 
> correctly in an OTG environment.  It should be possible to do this.  Is 
> there any particular reason why it would be difficult for Chipidea?
> 

I just want to do clean remove at OTG environment, like rmmod, so I did
this when I worked on chipidea OTG design.
I am worried if there are some resources dedicated for host device, eg,
clocks, gpio. etc.

If OTG framework can know well hcd's add and remove, it is ok for chipidea
just calling usb_add_hcd/usb_del_hcd currently, but I suggested roger
adding platform hcd_ops as optional parameter in case the platform
has special requirement for hcd_ops.

-- 

Best Regards,
Peter Chen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ