linux/Documentation
Mathias Nyman 31620fc1c8 xhci: dbc: support runtime suspend while DbC is in enabled state
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 520058b73b ("xhci: dbc: serialize enabling and disabling dbc")
which is also resolved by this patch

Fixes: 520058b73b ("xhci: dbc: serialize enabling and disabling dbc")
Reported-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Closes: https://lore.kernel.org/linux-usb/9ce24ff5-efab-4089-92d7-709862d68e6d@intel.com
Tested-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://patch.msgid.link/20260616100916.2234205-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-06-25 15:10:08 +01:00
..
ABI xhci: dbc: support runtime suspend while DbC is in enabled state 2026-06-25 15:10:08 +01:00
accel
accounting
admin-guide NFS Client Updates for Linux 7.2 2026-06-23 18:36:41 -07:00
arch soc: arm code changes for 7.2 2026-06-17 11:28:10 -07:00
block for-7.2/block-20260615 2026-06-16 13:02:47 +05:30
bpf Documentation/bpf: Refresh map_lru_hash_update.dot for rqspinlock 2026-06-07 18:46:13 -07:00
cdrom
core-api liveupdate: updates for 7.2-rc1 2026-06-21 09:46:14 -07:00
cpu-freq cpufreq: Use policy->min/max init as QoS request 2026-06-08 18:42:14 +02:00
crypto mm.git review status for mm-hotfixes-stable..mm-nonmm-stable 2026-06-21 13:20:19 -07:00
dev-tools linux_kselftest-next-7.2-rc1-second 2026-06-23 07:35:37 -07:00
devicetree pci-v7.2-changes 2026-06-24 12:48:43 -07:00
doc-guide
driver-api Char/Misc/IIO/FPGA/GPIB/etc driver updates for 7.2-rc1 2026-06-22 12:20:21 -07:00
edac
fault-injection
fb
features
filesystems f2fs-for-7.2-rc1 2026-06-23 17:59:36 -07:00
firmware_class
firmware-guide
fpga
gpu drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
hid
hwmon USB/Thunderbolt driver changes for 7.2-rc1 2026-06-22 12:09:47 -07:00
i2c
iio docs: iio: adc: ad4691: add driver documentation 2026-05-31 11:14:22 +01:00
images
infiniband docs: infiniband: correct name of option to enable the ib_uverbs module 2026-06-16 14:47:24 -03:00
input Input: userio - allow setting other id values 2026-06-01 21:49:14 -07:00
kbuild
kernel-hacking
leds LEDs for v7.2 2026-06-18 14:45:08 -07:00
litmus-tests
livepatch
locking Things have calmed down a bit on the docs front, with no earthshaking 2026-06-16 08:35:59 +05:30
maintainer
mhi
misc-devices
mm liveupdate: updates for 7.2-rc1 2026-06-21 09:46:14 -07:00
netlabel
netlink NFSD 7.2 Release Notes 2026-06-18 09:14:15 -07:00
networking appletalk: stop storing per-interface state in struct net_device 2026-06-16 14:37:06 -07:00
nvdimm
nvme
PCI
pcmcia
peci
power
process string: Remove strncpy() from the kernel 2026-06-18 16:39:31 -07:00
RCU
rust s390 updates for 7.2 merge window 2026-06-16 05:08:13 +05:30
scheduler sched_ext: Move sources under kernel/sched/ext/ 2026-06-22 05:32:56 -10:00
scsi
security integrity-v7.2 2026-06-19 11:32:05 -07:00
sound sound updates for 7.2-rc1 2026-06-17 11:18:45 +01:00
sphinx
sphinx-includes
sphinx-static
spi
staging
sunrpc/xdr Documentation: Add the RPC language description of NLM version 3 2026-06-09 16:32:59 -04:00
target
tee
timers
tools SPDX patches for 7.2-rc1 2026-06-22 12:06:22 -07:00
trace perf tools changes for v7.2: 2026-06-23 11:34:49 -07:00
translations USB/Thunderbolt driver changes for 7.2-rc1 2026-06-22 12:09:47 -07:00
usb
userspace-api Char/Misc/IIO/FPGA/GPIB/etc driver updates for 7.2-rc1 2026-06-22 12:20:21 -07:00
virt Arm: 2026-06-19 08:56:49 -07:00
w1
watchdog Things have calmed down a bit on the docs front, with no earthshaking 2026-06-16 08:35:59 +05:30
wmi modpost: Handle malformed WMI GUID strings 2026-06-12 16:01:55 +03:00
.gitignore
.renames.txt
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst