LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Tanya Brokhman" <tlinder@codeaurora.org>
To: "'Alan Stern'" <stern@rowland.harvard.edu>
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 15:01:20 +0200	[thread overview]
Message-ID: <001601cbc922$a0abb630$e2032290$@org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1101271116470.2090-100000@iolanthe.rowland.org>

> > +	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?

I'll fix this for all devised but SS.


Best regards,
Tanya Brokhman
Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum





  parent reply	other threads:[~2011-02-10 13:01 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 [this message]
2011-02-10 15:13     ` Alan Stern

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='001601cbc922$a0abb630$e2032290$@org' \
    --to=tlinder@codeaurora.org \
    --cc=gregkh@suse.de \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --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).