From: Keith Busch <kbusch@kernel.org>
To: Marcos Scriven <marcos@scriven.org>
Cc: linux-nvme@lists.infradead.org
Subject: Re: My Western Digital SN850 appears to suffer from deep power state issues - considering submitting quirk patch.
Date: Sun, 15 May 2022 14:13:26 -0600 [thread overview]
Message-ID: <YoFe5vPKrewePNx/@kbusch-mbp> (raw)
In-Reply-To: <YoFYIJ3/yEK1RGTK@kbusch-mbp>
On Sun, May 15, 2022 at 01:44:32PM -0600, Keith Busch wrote:
> There might be additional things we could do at the PCIe level, like a slot
> reset on the downstream port, but I haven't seen evidence that type of
> escalation improves anything so far. It might be worth a shot, though.
Something like this:
---
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1392,6 +1392,15 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
if (nvme_should_reset(dev, csts)) {
nvme_warn_reset(dev, csts);
nvme_dev_disable(dev, false);
+
+ if (csts == 0xffffffff) {
+ struct pci_dev *parent = to_pci_dev(dev->dev)->bus->self;
+
+ dev_warn(dev->ctrl.device, "link is inaccessible, attempt reset bus:%x\n",
+ parent->subordinate->number);
+ pci_reset_bus(parent);
+ }
+
nvme_reset_ctrl(&dev->ctrl);
return BLK_EH_DONE;
}
--
next prev parent reply other threads:[~2022-05-15 20:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-15 16:00 My Western Digital SN850 appears to suffer from deep power state issues - considering submitting quirk patch Marcos Scriven
2022-05-15 19:44 ` Keith Busch
2022-05-15 20:13 ` Keith Busch [this message]
2022-05-16 17:58 ` Christoph Hellwig
2022-05-19 10:14 ` Marcos Scriven
2022-05-19 20:02 ` 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=YoFe5vPKrewePNx/@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=marcos@scriven.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