Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@meta.com>
Cc: linux-nvme@lists.infradead.org, hch@lst.de,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH] nvme-pci: try function level reset on init failure
Date: Tue, 15 Jul 2025 09:45:58 +0200	[thread overview]
Message-ID: <20250715074558.GA20362@lst.de> (raw)
In-Reply-To: <20250714171328.681885-1-kbusch@meta.com>

On Mon, Jul 14, 2025 at 10:13:28AM -0700, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
> 
> I've encountered various nvme devices that for whatever reason are stuck
> in a reset state. Historically these have required a power cycle to make
> them usable again. Vendors don't report any problem with the device when
> we ship these for analysis.

Who is the "we" here?

> In many cases, a PCIe FLR is sufficient to restart operation without a
> power cycle. Try it if controller reset fails the first time.

Why is that only done in the probe path and not the runtime reset path?

> +	if (result < 0) {
> +		struct pci_dev *pdev = to_pci_dev(dev->dev);
> +
> +		result = pcie_flr(pdev);
> +		if (result < 0)
> +			return result;
> +		pci_restore_state(pdev);
> +
> +		result = nvme_disable_ctrl(&dev->ctrl, false);
> +		if (result < 0)
> +			return result;
> +	}

Either way this warrants a big comment explaining what we are doing
here.



  parent reply	other threads:[~2025-07-15  7:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-14 17:13 [PATCH] nvme-pci: try function level reset on init failure Keith Busch
2025-07-15  0:27 ` Chaitanya Kulkarni
2025-07-15  7:45 ` Christoph Hellwig [this message]
2025-07-15 13:30   ` Keith Busch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250715074558.GA20362@lst.de \
    --to=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-nvme@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox