From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Martin Thierer <mthierer@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>, linux-usb@vger.kernel.org
Subject: Re: Data toggles not reset on "set configuration" for ports handled by "xhci_hcd" driver
Date: Mon, 24 Aug 2020 16:48:51 +0300 [thread overview]
Message-ID: <cbdfafed-b8d4-ca07-bde1-4598f5117f04@linux.intel.com> (raw)
In-Reply-To: <CAL3BvCyxTvfUjecoYO0ie1vt4_+1cad+8Dt=xmcXogZSooGj+A@mail.gmail.com>
On 24.8.2020 16.10, Martin Thierer wrote:
>> True, xHCI doesn't reset the toggle in this case.
>> xHC only keeps track of added or dropped endpoints, it doesn't track
>> which configuration or interface is set.
>
> I'm not sure if it's relevant, but I found that calling libusb's
> set_interface() *does* seem to reset the data toggles also on xhci
> ports, even if it does not actually change the interface.
>
> Martin
It does, I checked that usb_set_configuration() ends up dropping and re-adding
the endpoint when it calls usb_hcd_alloc_bandwidth(), this should cause xhci
driver to reset the toggles.
Looks like libusb set_configuration could end up calling usb_reset_configuration() instead.
If there are no changes it's possible usb_hcd_alloc_bandwidth() never gets called, and
toggles never reset.
see drivers/usb/core/devio.c proc_setconfig()
-Mathias
next prev parent reply other threads:[~2020-08-24 13:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 12:30 Data toggles not reset on "set configuration" for ports handled by "xhci_hcd" driver Martin Thierer
2020-08-21 16:03 ` Alan Stern
2020-08-21 16:34 ` Martin Thierer
2020-08-21 17:01 ` Alan Stern
2020-08-24 10:22 ` Mathias Nyman
2020-08-24 13:10 ` Martin Thierer
2020-08-24 13:48 ` Mathias Nyman [this message]
2020-08-24 14:13 ` Mathias Nyman
2020-08-25 8:00 ` Martin Thierer
2020-08-25 11:53 ` Mathias Nyman
2020-08-25 15:10 ` Alan Stern
2020-08-26 8:37 ` Mathias Nyman
2020-08-26 14:37 ` Alan Stern
2020-08-26 7:40 ` Martin Thierer
2020-08-26 8:40 ` Mathias Nyman
2020-08-28 13:10 ` Mathias Nyman
2020-08-28 15:55 ` Alan Stern
2020-08-31 6:37 ` Mathias Nyman
2020-08-28 18:04 ` Martin Thierer
2020-08-31 6:41 ` Mathias Nyman
2020-08-31 9:35 ` Martin Thierer
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=cbdfafed-b8d4-ca07-bde1-4598f5117f04@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=mthierer@gmail.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.