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:	Mon, 22 Aug 2011 11:03:40 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Michal Nazarewicz <mina86@...a86.com>
cc:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Yang Rui Rui <ruirui.r.yang@...to.com>,
	Dave Young <hidave.darkstar@...il.com>,
	Felipe Balbi <balbi@...com>, <linux-usb@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv3 4/4] usb: gadget: get rid of USB_GADGET_{DUAL,SUPER}SPEED

On Mon, 22 Aug 2011, Michal Nazarewicz wrote:

> >> --- a/drivers/usb/gadget/inode.c
> >> +++ b/drivers/usb/gadget/inode.c
> > ...
> >> @@ -1773,11 +1767,7 @@ gadgetfs_suspend (struct usb_gadget *gadget)
> >>  }
> >>
> >>  static struct usb_gadget_driver gadgetfs_driver = {
> >> -#ifdef	CONFIG_USB_GADGET_DUALSPEED
> >>  	.max_speed	= USB_SPEED_HIGH,
> >> -#else
> >> -	.max_speed	= USB_SPEED_FULL,
> >> -#endif
> 
> > I'm not sure that a static definition is correct here.  The actual
> > max_speed depends on what descriptors the userspace program sends.
> > Take a look at the ep_config() routine.
> 
> Good catch.  I've changed it to:
> 
> if (dev->hs_config)
> 	gadgetfs_driver.max_speed = USB_SPEED_HIGH;
> else
> 	gadgetfs_driver.max_speed = USB_SPEED_FULL;
> 
> just before usb_gadget_probe_driver(), which should do the trick.

Yes, that sounds like the right thing to do.

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