Log pci_dbg() messages about the reset methods we attempt and any errors
(-ENOTTY means "try the next method").
Set CONFIG_DYNAMIC_DEBUG=y and enable by booting with
dyndbg="file drivers/pci/* +p" or enable at runtime:
  # echo "file drivers/pci/* +p" > /sys/kernel/debug/dynamic_debug/control
Link: https://lore.kernel.org/r/20250303204220.197172-1-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
 
 int __pci_reset_function_locked(struct pci_dev *dev)
 {
        int i, m, rc;
+       const struct pci_reset_fn_method *method;
 
        might_sleep();
 
                if (!m)
                        return -ENOTTY;
 
-               rc = pci_reset_fn_methods[m].reset_fn(dev, PCI_RESET_DO_RESET);
+               method = &pci_reset_fn_methods[m];
+               pci_dbg(dev, "reset via %s\n", method->name);
+               rc = method->reset_fn(dev, PCI_RESET_DO_RESET);
                if (!rc)
                        return 0;
+
+               pci_dbg(dev, "%s failed with %d\n", method->name, rc);
                if (rc != -ENOTTY)
                        return rc;
        }