From: "Neronin, Niklas" <niklas.neronin@linux.intel.com>
To: Thorsten Leemhuis <regressions@leemhuis.info>,
mathias.nyman@linux.intel.com
Cc: linux-usb@vger.kernel.org, Harald Judt <h.judt@gmx.at>,
Lovekesh Solanki <lovekeshsolanki00@gmail.com>,
Linux kernel regressions list <regressions@lists.linux.dev>
Subject: Re: [PATCH 1/5] usb: xhci: clear stale bandwidth data after hibernation
Date: Tue, 27 Oct 2026 12:57:26 +0200 [thread overview]
Message-ID: <e5f29297-2c89-4979-a760-b5d0c4e1ff8c@linux.intel.com> (raw)
In-Reply-To: <4e7a9bc8-4981-4dc4-bc2b-92579a694177@leemhuis.info>
On 27/10/2026 11.52, Thorsten Leemhuis wrote:
> On 10/6/26 17:24, Niklas Neronin wrote:
>> Controllers using software managed bandwidth accounting maintain
>> periodic endpoint bandwidth information in struct 'xhci_interval_bw_table'.
>>
>> Each root hub port owns a bandwidth table and a list of TT bandwidth
>> domains, where each TT has its own bandwidth table. Virtual devices
>> reference the bandwidth table of their current bandwidth domain through
>> 'bw_table' or 'tt_info'.
>
> What happened to this? This from what I see fixes a regression from the
> 7.1 cycle, so it would be good to finally resolve this for 7.4-rc1. But
> I see that Michal's review comment wasn't answered -- is that what we
> are waiting for. And I wonder if it was unwise to bundle this regression
> fix with other changed -- and if it should be resubmitted separately.
Planning to resubmit this separately, after the merge window, with minor
commit message improvements.
>
>> Historically, resume from S4 re-allocated the entire xHCI driver state,
>> which implicitly cleared all bandwidth accounting data. After the
>> hibernation resume path was optimized to preserve parts of the driver
>> state, virtual devices and TT bandwidth information were freed and
>> recreated, but the root hub bandwidth tables were left intact.
>>
>> As a result, stale bandwidth accounting data could remain in the root
>> hub bandwidth tables across hibernation resume, leading to incorrect
>> bandwidth calculations after devices were rediscovered.
>>
>> Fix this by resetting all software bandwidth accounting state in
>> xhci_rh_bw_cleanup() so that resume starts with a clean bandwidth state.
>> This includes 'xhci->num_active_eps', which must remain consistent with
>> the cleared bandwidth tables.
>
> BTW in case this needs to be resubmitted:
>> Fixes: <2a70e5dc0301> ("usb: xhci: optimize resuming from S4 (suspend-to-disk)")
>
> Drop the "<" and the ">" please.
Good catch, I'll fix that.
Thanks,
Niklas
next prev parent reply other threads:[~2026-10-27 10:57 UTC|newest]
Thread overview: 18+ 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-27 11:30 ` Neronin, Niklas
2026-10-06 16:22 ` sashiko-bot
2026-10-27 9:52 ` Thorsten Leemhuis
2026-10-27 10:57 ` Neronin, Niklas [this message]
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
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=e5f29297-2c89-4979-a760-b5d0c4e1ff8c@linux.intel.com \
--to=niklas.neronin@linux.intel.com \
--cc=h.judt@gmx.at \
--cc=linux-usb@vger.kernel.org \
--cc=lovekeshsolanki00@gmail.com \
--cc=mathias.nyman@linux.intel.com \
--cc=regressions@leemhuis.info \
--cc=regressions@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