From: Greg KH <gregkh@linuxfoundation.org>
To: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: chaitanya.kumar.borah@intel.com, linux-usb@vger.kernel.org
Subject: Re: [PATCH 1/1] xhci: dbc: support runtime suspend while DbC is in enabled state
Date: Tue, 16 Jun 2026 15:16:12 +0530 [thread overview]
Message-ID: <2026061602-underfed-glue-19b8@gregkh> (raw)
In-Reply-To: <20260616080932.2229237-2-mathias.nyman@linux.intel.com>
On Tue, Jun 16, 2026 at 11:09:32AM +0300, Mathias Nyman wrote:
> Allow xHC to runtime suspend if DbC is in 'enabled' state for over
> 15 seconds without a connect.
>
> Idea is that every time we go to 'enabled' state we make sure DbC runtime
> pm usage is '1' and save a timestamp. if the event loop still finds DbC in
> enabled state 15 seconds later then it decrease DbC runtime pm usage by
> calling pm_runtime_put().
> Enabled state is reached either when DbC is enabled by userspace or a
> connected/configured DbC is disconnected.
>
> When a connect is detected we make sure DbC usage count is 1.
>
> If DbC has been in 'enabled' state for 15 seconds and DbC usage is
> decreased to 0 by pm_runtime_put, then the whole xHC controller may
> runtime suspends to PCI D3 state if no other devices are using it
>
> DbC sysfs file will show 'suspended' when xHC is suspended and will wake up
> and enable DbC at cable connect, or when user writes 'enable' to the file.
>
> This patch was originally part of a larger DbC series, but dropped before
> the series was submitted to 7.2-rc1. The series has a locking issue in
> commit 520058b73ba3 ("xhci: dbc: serialize enabling and disabling dbc")
> which is also resolved by this patch
>
> Fixes: 520058b73ba3 ("xhci: dbc: serialize enabling and disabling dbc")
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> ---
> .../testing/sysfs-bus-pci-drivers-xhci_hcd | 2 +-
> drivers/usb/host/xhci-dbgcap.c | 60 ++++++++++++++++++-
> drivers/usb/host/xhci-dbgcap.h | 3 +
> 3 files changed, 62 insertions(+), 3 deletions(-)
No "reported-by:"?
next prev parent reply other threads:[~2026-06-16 9:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 8:09 [PATCH 0/1] xhci fixup patch for usb-next Mathias Nyman
2026-06-16 8:09 ` [PATCH 1/1] xhci: dbc: support runtime suspend while DbC is in enabled state Mathias Nyman
2026-06-16 9:46 ` Greg KH [this message]
2026-06-16 9:53 ` 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=2026061602-underfed-glue-19b8@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=chaitanya.kumar.borah@intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.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