linux-stable/drivers
Saravana Kannan d46f3e3ed5 driver core: Improve fw_devlink & deferred_probe_timeout interaction
deferred_probe_timeout kernel commandline parameter allows probing of
consumer devices if the supplier devices don't have any drivers.

fw_devlink=on will indefintely block probe() calls on a device if all
its suppliers haven't probed successfully. This completely skips calls
to driver_deferred_probe_check_state() since that's only called when a
.probe() function calls framework APIs. So fw_devlink=on breaks
deferred_probe_timeout.

deferred_probe_timeout in its current state also ignores a lot of
information that's now available to the kernel. It assumes all suppliers
that haven't probed when the timer expires (or when initcalls are done
on a static kernel) will never probe and fails any calls to acquire
resources from these unprobed suppliers.

However, this assumption by deferred_probe_timeout isn't true under many
conditions. For example:
- If the consumer happens to be before the supplier in the deferred
  probe list.
- If the supplier itself is waiting on its supplier to probe.

This patch fixes both these issues by relaxing device links between
devices only if the supplier doesn't have any driver that could match
with (NOT bound to) the supplier device. This way, we only fail attempts
to acquire resources from suppliers that truly don't have any driver vs
suppliers that just happen to not have probed yet.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20210402040342.2944858-3-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-05 09:17:56 +02:00
..
accessibility
acpi Merge branches 'acpi-tables' and 'acpi-scan' 2021-04-02 16:57:56 +02:00
amba
android
ata
atm
auxdisplay
base driver core: Improve fw_devlink & deferred_probe_timeout interaction 2021-04-05 09:17:56 +02:00
bcma
block block-5.12-2021-04-02 2021-04-02 16:13:13 -07:00
bluetooth
bus Fixes for omaps for v5.12-rc cycle 2021-03-18 23:52:27 +01:00
cdrom
char
clk Merge 5.12-rc6 into driver-core-next 2021-04-05 08:51:37 +02:00
clocksource
connector
counter
cpufreq cpufreq: Fix scaling_{available,boost}_frequencies_show() comments 2021-03-26 17:43:48 +01:00
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon Merge 5.12-rc6 into driver-core-next 2021-04-05 08:51:37 +02:00
firewire firewire: nosy: Fix a use-after-free bug in nosy_ioctl() 2021-04-04 14:05:45 -07:00
firmware Another couple of EFI fixes for v5.12-rc: 2021-03-19 14:23:46 +01:00
fpga
fsi
gnss
gpio
gpu drm/imx: imx-drm-core and imx-ldb fixes 2021-04-02 04:53:16 +10:00
greybus
hid
hsi
hv
hwmon hwmon: raspberry-pi: Clean-up few drivers by using managed work init 2021-03-23 15:22:40 +01:00
hwspinlock
hwtracing
i2c
i3c
ide
idle
iio
infiniband RDMA 5.12 second rc pull request 2021-03-25 11:23:35 -07:00
input
interconnect interconnect: Fix kerneldoc warning 2021-03-18 23:46:21 +02:00
iommu iommu/tegra-smmu: Make tegra_smmu_probe_device() to handle all IOMMU phandles 2021-03-18 11:31:12 +01:00
ipack
irqchip
isdn isdn: capi: fix mismatched prototypes 2021-03-22 16:51:11 -07:00
leds
lightnvm
macintosh
mailbox
mcb
md dm ioctl: fix out of bounds array access when no devices 2021-03-26 14:51:50 -04:00
media
memory
memstick
message
mfd mfd: intel_quark_i2c_gpio: Revert "Constify static struct resources" 2021-03-23 09:14:12 +00:00
misc mei: allow map and unmap of client dma buffer only for disconnected client 2021-03-23 15:15:15 +01:00
mmc
most
mtd
mux
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-03-24 18:16:04 -07:00
nfc
ntb
nubus
nvdimm
nvme nvmet-tcp: fix kmap leak when data digest in use 2021-03-18 05:39:18 +01:00
nvmem
of of: property: fw_devlink: Add support for remote-endpoint 2021-04-02 17:06:58 +02:00
opp
parisc
parport
pci powerpc fixes for 5.12 #4 2021-03-21 10:57:35 -07:00
pcmcia
perf
phy
pinctrl intel-pinctrl for v5.12-3 2021-03-30 00:46:49 +02:00
platform Merge 5.12-rc6 into driver-core-next 2021-04-05 08:51:37 +02:00
pnp
power power: supply: axp20x_usb_power: fix work-queue init 2021-03-26 15:45:33 +01:00
powercap
pps
ps3
ptp ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation 2021-03-24 12:10:03 -07:00
pwm
rapidio
ras
regulator regulator: qcom_spmi-regulator: Clean-up by using managed work init 2021-03-23 15:22:40 +01:00
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi SCSI fixes on 20210402 2021-04-03 09:07:35 -07:00
sh
siox
slimbus
soc OpenRISC fix for 5.12 2021-04-03 15:42:45 -07:00
soundwire
spi
spmi
ssb
staging staging: rtl8192e: Change state information from u16 to u8 2021-03-23 13:32:40 +01:00
target scsi: target: pscsi: Clean up after failure in pscsi_map_sg() 2021-03-24 23:19:23 -04:00
tc
tee
thermal
thunderbolt
tty Serial driver fix for 5.12-rc6 2021-04-03 10:00:53 -07:00
uio
usb usb: dwc2: Prevent core suspend when port connection flag is 0 2021-03-26 14:51:34 +01:00
vdpa
vfio vfio/nvlink: Add missing SPAPR_TCE_IOMMU depends 2021-03-29 14:48:00 -06:00
vhost virtio: fixes, cleanups 2021-03-18 11:20:35 -07:00
video hyperv-fixes for 5.12-rc6 2021-04-03 10:42:20 -07:00
virt
virtio virtio: fixes, cleanups 2021-03-18 11:20:35 -07:00
visorbus
vlynq
vme
w1
watchdog watchdog: retu_wdt: Clean-up by using managed work init 2021-03-23 15:22:40 +01:00
xen xen: branch for v5.12-rc5 2021-03-26 11:15:25 -07:00
zorro
Kconfig
Makefile