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: <Pine.LNX.4.44L0.1105231710590.2020-100000@iolanthe.rowland.org>
Date:	Mon, 23 May 2011 17:21:01 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Felipe Balbi <balbi@...com>
cc:	Sarah Sharp <sarah.a.sharp@...ux.intel.com>,
	Tanya Brokhman <tlinder@...eaurora.org>, <greg@...ah.com>,
	<linux-usb@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
	<ablay@...eaurora.org>, 'open list' <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v12 7/8] usb: Adding SuperSpeed support to dummy_hcd

On Tue, 24 May 2011, Felipe Balbi wrote:

> > It would be more accurate to say the module parameter will be used to
> > force the connection to run at a lower speed than the maximum possible.  
> > This is kind of like what happens when you plug in a SuperSpeed device 
> > using a USB-2 cable -- the connection runs at a lower speed than it 
> > could have.
> 
> if it's something like that, for sure we can have the module parameter. But
> plugging a USB2 gadget/function to a USB3-capable UDC/HCD should
> work fine.
> 
> With Tatyana's patches, if we load a USB2 g_zero to dummy_hcd, enumeration
> will fail where it shouldn't. This has been my whole point ;-) Maybe I wasn't
> clear enough.

I guess not.  I thought Tatyana said she was working to fix that bug...

> >> What about the case where SuperSpeed enumeration
> >> fails and you have to fall back to high speed?
> > 
> > If SuperSpeed enumeration fails, say because the device doesn't have 
> > any SuperSpeed descriptors, xhci-hcd doesn't fall back to high speed, 
> > does it?  dummy-hcd should behave the same way.
> 
> it should at least. Isn't that what happens between EHCI/OHCI ? HS Chirp
> sequencing fails, then we fall back to FullSpeed.

That's a failure in initialization, not a failure in enumeration.

There are two reasons why the HS chirp might fail: the device doesn't 
support high speed operation or hardware errors prevent the chirp from 
working.  With dummy-hcd there are no hardware errors (because there's 
no hardware).

As for whether or not the device supports high-speed or SuperSpeed
operation, that's determined by the usb_gadget_driver->speed field.  If 
the field doesn't specify SuperSpeed then dummy-hcd should connect the 
gadget to the USB-2 root hub rather than the USB-3 root hub.  Isn't 
that what Tatyana's patch does?  It contains a line saying:

		dum->gadget.speed = driver->speed;

> >> It seems like you really
> >> need to handle both speeds and the speed fall back parameter in the same
> >> driver.  Isn't there some other gadget driver that has a fall back to
> >> full or low speed when high speed enumeration fails?
> > 
> > That's a property of the gadget driver, not the UDC driver.  dummy-hcd 
> > is a UDC driver (and an HCD too).
> 
> USB3.0 dummy_hcd should still enumerate USB2.0 gadget drivers.

Yes, certainly it should.  If it doesn't, that's a bug, not a design 
error.

Alan Stern

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ