From: Felipe Balbi <balbi@kernel.org>
To: Mathias Nyman <mathias.nyman@linux.intel.com>,
Alan Stern <stern@rowland.harvard.edu>
Cc: "Rene D. Obermueller" <cmdrrdo@gmail.com>, linux-usb@vger.kernel.org
Subject: Re: ERROR: unexpected command completion code 0x11 for DJ-Tech CTRL (resending as plain text ;)
Date: Fri, 03 Jan 2020 11:29:33 +0200 [thread overview]
Message-ID: <87v9pskhvm.fsf@kernel.org> (raw)
In-Reply-To: <6fb5bd57-5209-3344-b52c-a1d311ac1644@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]
Hi,
Mathias Nyman <mathias.nyman@linux.intel.com> writes:
>>>>> Maybe forcing it to one of the allowed values could work.
>>>>> Does the below hack help? (untested)?
>>>>
>>>> Is this the sort of thing we should handle in
>>>> config.c:usb_parse_endpoint()?
>>>>
>>>> Even though 4 is not a valid maxpacket size for full-speed bulk
>>>> endpoints, many host controllers and hubs will handle it okay. Much
>>>> the same is true for devices that have a high-speed bulk endpoint with
>>>> maxpacket set to 1024. Should we try to treat these two errors the
>>>> same way?
>>>
>>> Makes sense.
>>> Looks like config.c:usb_parse_endpoint() shows a warning if maxpacket size is incorrect for
>>> high-speed bulk endpoints, but leaves the maxpacket size unchanged.
>>> If xhci is used then the xhci driver will later force the maxpacket to 512
>>
>> Does the driver do this because otherwise the controller will refuse to
>> handle the endpoint?
>>
>> There are indeed high-speed devices that have a bulk endpoint with
>> maxpacket set to 1024; I have used some. They work okay with EHCI
>> because the driver and the controller will accept the invalid value.
>> But probably they won't work with xHCI.
>
> Looks like high-speed bulk endpoint maxpacket was forced to 512 to handle cases where
> wMaxPacketSize was smaller than 512. Some xHC controllers apparently couldn't handle that.
yeah, that's part of the USB spec. High-speed bulk endpoints must have
wMaxPacketSize of 512. Similarly for Super-speed, it must be 1024.
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2020-01-03 9:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-20 13:50 ERROR: unexpected command completion code 0x11 for DJ-Tech CTRL (resending as plain text ;) Rene D. Obermueller
2019-12-20 14:48 ` Mathias Nyman
[not found] ` <d65f140c-0854-62a5-f21e-5d92f0575635@gmail.com>
2019-12-23 12:14 ` Mathias Nyman
2019-12-23 22:15 ` Rene D. Obermueller
2019-12-24 15:28 ` Alan Stern
2020-01-02 11:20 ` Mathias Nyman
2020-01-02 15:31 ` Alan Stern
2020-01-02 16:01 ` Mathias Nyman
2020-01-03 9:29 ` Felipe Balbi [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=87v9pskhvm.fsf@kernel.org \
--to=balbi@kernel.org \
--cc=cmdrrdo@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=stern@rowland.harvard.edu \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.