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] [day] [month] [year] [list]
Date:	Thu, 3 Oct 2013 10:20:13 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Robert Baldyga <r.baldyga@...sung.com>
cc:	balbi@...com, <gregkh@...uxfoundation.org>,
	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<b.zolnierkie@...sung.com>, <m.szyprowski@...sung.com>,
	<andrzej.p@...sung.com>
Subject: Re: [PATCH v4] USB: gadget: epautoconf: fix ep maxpacket check

On Thu, 3 Oct 2013, Robert Baldyga wrote:

> > This disagrees with the kerneldoc for usb_ep_autoconfig().  For bulk
> > endpoints, wMaxPacket is always supposed to be set to the full-speed
> > value, regardless of what the protocol driver specifies.
> 
> Hmm, it looks like all gadgets calls usb_ep_autoconfig() for full speed
> descriptors and after it they uses usb_assign_descriptors() function to 
> set descriptors proper for device speed.

Also, the gadgets have the wMaxPacketSize value hard-coded for the HS 
and SS descriptors.

>  And it works until gadget sets 
> full speed descriptors. But what if gadget supports only high speed and
> don't want to set full speed descriptors? If it will use
> usb_ep_autoconfig() function for high speed descriptor, value of
> wMaxPacketSize field will change to 64. Is there any good solution for 
> this problem or all gadgets have to support full speed?

The gadget driver can change wMaxPacketSize back to the correct value 
after calling usb_ep_autoconfig().

Or you can change the definition of usb_ep_autoconfig(), and have the 
driver pass the speed value as an additional argument.

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