From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Udipto Goswami <udipto.goswami@oss.qualcomm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mathias Nyman <mathias.nyman@intel.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] usb: xhci: Skip configure EP for disabled slots during teardown
Date: Mon, 5 Jan 2026 13:02:03 +0200 [thread overview]
Message-ID: <5f0e0401-fc0b-4ac7-ab95-7f85e6677b86@linux.intel.com> (raw)
In-Reply-To: <20260105084805.2155251-1-udipto.goswami@oss.qualcomm.com>
Hi
On 1/5/26 10:48, Udipto Goswami wrote:
> Consider a scenario when a HS headset fails resume and the hub performs
> a logical disconnect, the USB core tears down endpoints and calls
> hcd->check_bandwidth() on the way out, which with xHCI translates to a
> drop-only Configure Endpoint command (add_flags == SLOT_FLAG, drop_flags
> != 0). If the slot is already disabled (slot_id == 0) or the virtual
> device has been freed, issuing this Configure Endpoint command is
> pointless and may appear stuck until event handling catches up,
> causing unnecessary delays during disconnect teardown.
>
> Fix this by adding a check in xhci_check_bandwidth(), return success
> immediately if slot_id == 0 or vdev is missing, preventing the
> Configure Endpoint command from being queued at all. Additionally,
> in xhci_configure_endpoint() for drop-only Configure Endpoint operations,
> return success early if slot_id == 0 or vdev is already freed,
> avoiding spurious command waits.
>
> Signed-off-by: Udipto Goswami <udipto.goswami@oss.qualcomm.com>
Makes sense to prevent unnecessary 'configure endpoint' commands
Could you share more details how we end up tearing down endpoints and
calling xhci_check_bandwidth() after vdev is freed and slot_id set to zero?
Did the whole xHC controller fail to resume and was reinitialized in
xhci_resume() power_lost path?
Or is this related to audio offload and xhci sideband usage?
If we end up in this situation in normal headset resume failure then there
might be something else wrong.
Thanks
Mathias
next prev parent reply other threads:[~2026-01-05 11:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 8:48 [RFC PATCH] usb: xhci: Skip configure EP for disabled slots during teardown Udipto Goswami
2026-01-05 11:02 ` Mathias Nyman [this message]
2026-01-06 10:22 ` Udipto Goswami
2026-01-07 16:50 ` Mathias Nyman
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=5f0e0401-fc0b-4ac7-ab95-7f85e6677b86@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=udipto.goswami@oss.qualcomm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox