lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250310184300.GA561876@bhelgaas>
Date: Mon, 10 Mar 2025 13:43:00 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: linux-pci@...r.kernel.org
Cc: Alex Williamson <alex.williamson@...hat.com>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	Keith Busch <kbusch@...nel.org>, Todd Kjos <tkjos@...gle.com>,
	Dan Williams <dan.j.williams@...el.com>,
	Dave Jiang <dave.jiang@...el.com>, linux-kernel@...r.kernel.org,
	Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH] PCI: Log debug messages about reset method

On Mon, Mar 03, 2025 at 02:42:20PM -0600, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@...gle.com>
> 
> 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
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>

Applied to pci/reset for v6.15.

> ---
>  drivers/pci/pci.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 869d204a70a3..3d13bb8e5c53 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -5230,6 +5230,7 @@ const struct pci_reset_fn_method pci_reset_fn_methods[] = {
>  int __pci_reset_function_locked(struct pci_dev *dev)
>  {
>  	int i, m, rc;
> +	const struct pci_reset_fn_method *method;
>  
>  	might_sleep();
>  
> @@ -5246,9 +5247,13 @@ int __pci_reset_function_locked(struct pci_dev *dev)
>  		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;
>  	}
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ