LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Tanya Brokhman <tlinder@codeaurora.org>
Cc: gregkh@suse.de, <linux-arm-msm@vger.kernel.org>,
	"'open list:USB GADGET/PERIPH...'" <linux-usb@vger.kernel.org>,
	"'open list'" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v7 1/5] usb: Adding SuperSpeed support to dummy_hcd
Date: Thu, 10 Feb 2011 10:13:25 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1102101011480.2029-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <001601cbc922$a0abb630$e2032290$@org>

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


      reply	other threads:[~2011-02-10 15:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 13:11 Tatyana Brokhman
2011-01-27 16:27 ` Alan Stern
2011-01-31 15:09   ` Tanya Brokhman
2011-01-31 15:41     ` Alan Stern
2011-01-31 16:33       ` Tanya Brokhman
2011-02-10 13:01   ` Tanya Brokhman
2011-02-10 15:13     ` Alan Stern [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44L0.1102101011480.2029-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=gregkh@suse.de \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=tlinder@codeaurora.org \
    --subject='RE: [PATCH v7 1/5] usb: Adding SuperSpeed support to dummy_hcd' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).