Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Niklas Neronin" <niklas.neronin@linux.intel.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH 2/5] usb: xhci: correct num_active_eps accounting on allocation failure
Date: Tue, 06 Oct 2026 16:29:37 +0000	[thread overview]
Message-ID: <sashiko-outbox-162256@kernel.org> (raw)
In-Reply-To: <20261006152427.3735383-3-niklas.neronin@linux.intel.com>

> Some host controllers have a global endpoint limit across all slots,
> tracked by 'xhci->num_active_eps' when XHCI_EP_LIMIT_QUIRK is set.
> 
> During device allocation, EP0 resources are reserved before
> xhci_alloc_virt_device() is called, and 'num_active_eps' is incremented
> accordingly. If xhci_alloc_virt_device() subsequently fails, the slot is
> disabled but the reserved endpoint resource is not released, leaving
> 'num_active_eps' permanently increased.
> 
> Decreasing 'num_active_eps' happens in xhci_handle_cmd_disable_slot(),
> which is called upon a Disable Slot completion command.
> 
> This causes the driver to gradually lose available endpoint resources
> after allocation failures and may eventually prevent new endpoints from
> being allocated.
> 
> Fix this by decrementing 'num_active_eps' when virtual device allocation
> fails.
> 
> Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261006152427.3735383-1-niklas.neronin@linux.intel.com?part=2


  reply	other threads:[~2026-10-06 16:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06 15:24 [PATCH 0/5] usb: xhci: bandwidth accounting fixes and cleanup Niklas Neronin
2026-10-06 15:24 ` [PATCH 1/5] usb: xhci: clear stale bandwidth data after hibernation Niklas Neronin
2026-10-06 16:12   ` Michal Pecio
2026-10-06 16:22   ` sashiko-bot
2026-10-06 15:24 ` [PATCH 2/5] usb: xhci: correct num_active_eps accounting on allocation failure Niklas Neronin
2026-10-06 16:29   ` sashiko-bot [this message]
2026-10-06 16:33   ` Michal Pecio
2026-10-06 21:02     ` Michal Pecio
2026-10-07  9:28       ` Neronin, Niklas
2026-10-06 15:24 ` [PATCH 3/5] usb: xhci: remove redundant TT active EP update from xhci_free_virt_device() Niklas Neronin
2026-10-06 16:41   ` sashiko-bot
2026-10-06 15:24 ` [PATCH 4/5] usb: xhci: correct variable size conversion Niklas Neronin
2026-10-06 16:46   ` sashiko-bot
2026-10-06 15:24 ` [PATCH 5/5] usb: xhci: remove unused structs Niklas Neronin
2026-10-06 16:47   ` sashiko-bot

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=sashiko-outbox-162256@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=niklas.neronin@linux.intel.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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