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] [day] [month] [year] [list]
Date:	Thu, 10 Feb 2011 10:13:25 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Tanya Brokhman <tlinder@...eaurora.org>
cc:	gregkh@...e.de, <linux-arm-msm@...r.kernel.org>,
	"'open list:USB GADGET/PERIPH...'" <linux-usb@...r.kernel.org>,
	'open list' <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v7 1/5] usb: Adding SuperSpeed support to dummy_hcd

On Thu, 10 Feb 2011, Tanya Brokhman wrote:

> > > +	if (dum->gadget.speed < USB_SPEED_SUPER)
> > > +		max &= 0x3ff;
> > 
> > Strictly speaking, both the old and the new code are wrong.  For all
> > devices, regardless of speed, we should say:
> > 
> > 	max = le16_to_cpu(desc->wMaxPacketSize) & 0x7ff;
> > 
> > In other words, the speed is contained in bits 0..10 (not 0..9).
> > 
> 
> You're right about HS/FS/LS devices but I see something different in the
> USB30 spec for SS devices. Could you please refer me to what errata this was
> mentioned in? I looked through them and according to errata from 01/15/09
> the definition of wMaxPacketSize field in the SS endpoint descriptor is:
> 
> "Maximum packet size this endpoint is capable of sending or receiving when
> this configuration is selected. For control endpoints this field shall be
> set to 512. For bulk endpoint types this field shall be set to 1024."
> 
> So according to the above, for SS devices, the whole 2 bytes contain the
> maxpacketsize and not only bits 0..10. 
> Am I missing something?

No, you are right.  However, it is still true even with SS that the
value is contained in bits 0..10, since the value can never be larger
than 2047.

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