linux-stable/drivers/pci
Ido Schimmel 0a5ef95923 PCI: Add debug print for device ready delay
Currently, the time it took a PCI device to become ready after reset is
only printed if it was longer than 1000ms ('PCI_RESET_WAIT'). However,
for debugging purposes it is useful to know this time even if it was
shorter. For example, with the device I am working on, hardware
engineers asked to verify that it becomes ready on the first try (no
delay).

To that end, add a debug level print that can be enabled using dynamic
debug. Example:

 # echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset
 # dmesg -c | grep ready
 # echo "file drivers/pci/pci.c +p" > /sys/kernel/debug/dynamic_debug/control
 # echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset
 # dmesg -c | grep ready
 [  396.060335] mlxsw_spectrum4 0000:01:00.0: ready 0ms after bus reset
 # echo "file drivers/pci/pci.c -p" > /sys/kernel/debug/dynamic_debug/control
 # echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset
 # dmesg -c | grep ready

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-11-18 17:38:50 +00:00
..
controller pci-v6.7-changes 2023-11-02 14:05:18 -10:00
endpoint Merge branch 'pci/misc' 2023-10-28 13:31:05 -05:00
hotplug Merge branch 'pci/field-get' 2023-10-28 13:31:05 -05:00
msi PCI/MSI: Use FIELD_GET/PREP() 2023-10-24 10:54:04 -05:00
pcie cxl for v6.7 2023-11-04 16:20:36 -10:00
switch PCI: switchtec: Add support for PCIe Gen5 devices 2023-08-09 14:16:44 -05:00
access.c PCI: Simplify pcie_capability_clear_and_set_word() control flow 2023-08-25 08:16:10 -05:00
ats.c PCI/ATS: Use FIELD_GET() 2023-10-24 16:55:45 -05:00
bus.c Devicetree updates for v6.6: 2023-08-30 16:59:03 -07:00
doe.c PCI/DOE: Fix destroy_work_on_stack() race 2023-07-27 15:20:47 -05:00
ecam.c
host-bridge.c
iov.c PCI/IOV: Use pci_dev_id() to simplify the code 2023-08-07 16:15:39 -05:00
irq.c
Kconfig PCI: Replace unnecessary UTF-8 in Kconfig 2023-10-06 14:30:48 -05:00
Makefile PCI: Create device tree node for bridge 2023-08-22 14:56:09 -05:00
mmap.c
of.c PCI: of: Destroy changeset when adding PCI device node fails 2023-09-29 17:33:51 -05:00
of_property.c PCI: of_property: Handle interrupt parsing failures 2023-09-29 17:33:46 -05:00
p2pdma.c PCI/P2PDMA: Remove redundant goto 2023-10-23 12:17:52 -05:00
pci-acpi.c Merge branch 'pci/pm' 2023-10-28 13:30:59 -05:00
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c PCI/PM: Mark devices disconnected if upstream PCIe link is down on resume 2023-09-29 17:42:00 -05:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c Driver core changes for 6.7-rc1 2023-11-03 15:15:47 -10:00
pci.c PCI: Add debug print for device ready delay 2023-11-18 17:38:50 +00:00
pci.h PCI: Add T_PVPERL macro 2023-10-20 12:11:25 +00:00
probe.c Merge branch 'pci/field-get' 2023-10-28 13:31:05 -05:00
proc.c
quirks.c PCI: Add no PM reset quirk for NVIDIA Spectrum devices 2023-11-18 17:38:50 +00:00
remove.c PCI: Create device tree node for bridge 2023-08-22 14:56:09 -05:00
rom.c
search.c PCI: Add pci_get_base_class() helper 2023-09-28 16:49:44 -05:00
setup-bus.c PCI: Make pci_assign_unassigned_resources() non-init 2023-10-05 11:11:31 -05:00
setup-irq.c
setup-res.c PCI: Fix printk field formatting 2023-08-25 08:15:08 -05:00
slot.c
syscall.c PCI: Use consistent put_user() pointer types 2023-08-25 08:15:13 -05:00
vc.c PCI/VC: Use FIELD_GET() 2023-10-24 16:55:45 -05:00
vgaarb.c pci-v6.7-changes 2023-11-02 14:05:18 -10:00
vpd.c PCI/VPD: Add runtime power management to sysfs interface 2023-08-11 14:19:16 -05:00
xen-pcifront.c x86: always initialize xen-swiotlb when xen-pcifront is enabling 2023-07-31 17:54:27 +02:00