WSL2-Linux-Kernel/drivers
Rafael J. Wysocki 14858dcc3b PCI: Use pci_update_current_state() in pci_enable_device_flags()
Updating the current_state field of struct pci_dev the way it is done
in pci_enable_device_flags() before calling do_pci_enable_device() may
not work.  For example, if the given PCI device depends on an ACPI
power resource whose _STA method initially returns 0 ("off"), but the
config space of the PCI device is accessible and the power state
retrieved from the PCI_PM_CTRL register is D0, the current_state
field in the struct pci_dev representing that device will get out of
sync with the power.state of its ACPI companion object and that will
lead to power management issues going forward.

To avoid such issues, make pci_enable_device_flags() call
pci_update_current_state() which takes ACPI device power management
into account, if present, to retrieve the current power state of the
device.

Link: https://lore.kernel.org/lkml/20210314000439.3138941-1-luzmaximilian@gmail.com/
Reported-by: Maximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Maximilian Luz <luzmaximilian@gmail.com>
2021-07-16 19:31:35 +02:00
..
accessibility
acpi
amba
android
ata ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
atm
auxdisplay
base
bcma
block
bluetooth
bus ARM: Drivers for 5.14 2021-07-10 09:46:20 -07:00
cdrom
char ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
clk
clocksource
comedi
connector
counter
cpufreq
cpuidle
crypto ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
cxl
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware ARM: Drivers for 5.14 2021-07-10 09:46:20 -07:00
fpga
fsi
gnss
gpio
gpu
greybus
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
i3c I3C for 5.14 2021-07-10 11:53:06 -07:00
idle
iio
infiniband
input
interconnect
iommu ARM: Drivers for 5.14 2021-07-10 09:46:20 -07:00
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc
mmc
most
mtd
mux
net ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
parisc
parport
pci PCI: Use pci_update_current_state() in pci_enable_device_flags() 2021-07-16 19:31:35 +02:00
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset ARM: Drivers for 5.14 2021-07-10 09:46:20 -07:00
rpmsg
rtc RTC for 5.14 2021-07-10 16:19:10 -07:00
s390 s390 updates for the 5.14 merge window #2 2021-07-10 10:46:14 -07:00
sbus
scsi SCSI misc on 20210711 2021-07-11 10:59:53 -07:00
sh
siox
slimbus
soc ARM: Drivers for 5.14 2021-07-10 09:46:20 -07:00
soundwire
spi
spmi
ssb
staging
target
tc
tee
thermal - Add rk3568 sensor support (Finley Xiao) 2021-07-10 11:43:25 -07:00
thunderbolt
tty
uio
usb
vdpa
vfio
vhost
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile