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:	Tue, 23 Aug 2011 11:43:44 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Felipe Balbi <balbi@...com>
cc:	Michal Nazarewicz <mnazarewicz@...gle.com>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Yang Rui Rui <ruirui.r.yang@...to.com>,
	Dave Young <hidave.darkstar@...il.com>,
	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv3 2/4] usb: gadget: replace "is_dualspeed" with "max_speed"

On Tue, 23 Aug 2011, Felipe Balbi wrote:

> Hi,
> 
> On Tue, Aug 23, 2011 at 10:37:23AM -0400, Alan Stern wrote:
> > On Tue, 23 Aug 2011, Michal Nazarewicz wrote:
> > 
> > > My understanding was that one could consciously create a composite gadget
> > > such that not all of the functions support all of the speeds.
> > 
> > That's an important point.  If somebody wants to build a composite 
> > gadget that includes both midi and storage support, the storage driver 
> > would be able to go all the way up to SuperSpeed (or rather, it will 
> > once Felipe's patch is finished and merged) but the midi driver would 
> > only support full speed.  So what speed should the UDC connect at?
> 
> if they are both part of the of the same configuration, full speed.
> Otherwise Audio won't work. If they are part of different
> configurations, then maximum_speed will be defined by the chosen config,
> no ?

No.  The speed has to be chosen first, when the gadget connects to the 
host.  The config isn't chosen until later, after the host retrieves 
the various descriptors and decides among them.

> > In cases like this there's really no way to know.  Ultimately the best 
> > approach would be to update the midi driver, but that's a long-term 
> > sort of thing.
> 
> yeah, I agree here.
> 
> > Usually when the kernel can't decide something, it asks the user for 
> > help (by allowing the user to specify the speed via a module parameter, 
> > for instance).  In this case even that wouldn't work, because the 
> > gadget's userspace isn't aware of which functions the host's user will 
> > want to utilize.
> > 
> > At the moment I don't know the best answer.  This is something we 
> > should all think about.
> 
> I stand with the fact that if they are part of the same configuration,
> there's no way around it, storage will have to come down to full speed.
> Unless I'm missing something.

What if they are in different configurations?

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