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  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, 18 Mar 2015 19:38:07 -0700
From:	Tony Lindgren <tony@...mide.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Roger Quadros <rogerq@...com>, gregkh@...uxfoundation.org,
	balbi@...com, dan.j.williams@...el.com, peter.chen@...escale.com,
	jun.li@...escale.com, mathias.nyman@...ux.intel.com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-omap@...r.kernel.org
Subject: Re: [RFC][PATCH 1/9] usb: hcd: Introduce usb_start/stop_hcd()

* Alan Stern <stern@...land.harvard.edu> [150318 18:51]:
> On Wed, 18 Mar 2015, Tony Lindgren wrote:
> 
> > > If the host controller is started more than once, you will end up
> > > unregistering and re-registering the root hub.  The device core does
> > > not allow this.  Once a device has been unregistered, you must not try
> > > to register it again -- you have to allocate a new device and register
> > > it instead.
> > > 
> > > Also, although you call the driver's ->start method multiple times, the
> > > ->reset method is called only once, when the controller is first 
> > > probed.  It's not clear that this will work in a situation where the HC 
> > > and the UDC share hardware state; after the UDC is stopped it may be 
> > > necessary to reset the HC before it can run again.
> > > 
> > > It might be possible to make this work, but I suspect quite a few 
> > > drivers would need rewriting first.  As another example of the problems 
> > > you face, consider how stopping a host controller will interact with 
> > > the driver's PM support (both system suspend and runtime suspend).
> > > 
> > > It would be a lot simpler to unbind the host controller driver
> > > completely when switching to device mode and rebind it when switching
> > > back.  I guess that is the sort of heavy-duty approach you want to
> > > avoid, but it may be the only practical way forward.
> > 
> > Hmm from memory I think the OTG spec assumes the USB devices are
> > suspended when attempting the role change? I could be totally wrong,
> > it's been a really long time since I've looked at the OTG spec, but
> > maybe that would make it easier to deal with thing?
> 
> This patch deals with the host side, not the device side.  The fact
> that the device is suspended is not relevant to the issues above.

OK, got it.
 
> Besides, the problems I outlined are more connected with the way 
> Linux's host-side USB stack is organized, and not so much with the 
> details of the OTG spec.

Yes thanks for the explanation.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists