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
..
2023-11-02 14:05:18 -10:00
2023-10-28 13:31:05 -05:00
2023-10-28 13:31:05 -05:00
2023-10-24 10:54:04 -05:00
2023-11-04 16:20:36 -10:00
2023-10-24 16:55:45 -05:00
2023-08-30 16:59:03 -07:00
2023-10-23 12:17:52 -05:00
2023-10-28 13:30:59 -05:00
2023-11-03 15:15:47 -10:00
2023-10-20 12:11:25 +00:00
2023-10-28 13:31:05 -05:00
2023-09-28 16:49:44 -05:00
2023-08-25 08:15:08 -05:00
2023-10-24 16:55:45 -05:00
2023-11-02 14:05:18 -10:00