Skip to contentSkip to conversation

nvme/pci: Use saved CSTS value

PATCH New Keith Busch 4 participants 4 messages Jun 14, 2017 – Jun 15, 2017 NVMe

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 nvme/pci: Use saved CSTS value

In reply to Keith Busch

Keith,

Quoted 2 lines

Don't re-read controller status when checking controller health on an IO timeout.

Reviewed-by Martin K. Petersen <martin.petersen at oracle.com>
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#0 lore raw

PATCH 1/1 nvme/pci: Use saved CSTS value

Don't re-read controller status when checking controller health on an IO timeout.

Signed-off-by Keith Busch <keith.busch at intel.com>

---
Note for Christoph: I planned to fold this into a v2 of the watchdog timer removal, but I see that was added in commit afd83d84461808, but under the wrong author. :)

 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/pci.c +1 -1
index 788bb2c..85f9739 100644
@@ -1003,7 +1003,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
 	/*
 	 * Reset immediately if the controller is failed
 	 */
-	if (nvme_should_reset(dev, readl(dev->bar + NVME_REG_CSTS))) {
+	if (nvme_should_reset(dev, csts)) {
 		nvme_warn_reset(dev, csts);
 		nvme_dev_disable(dev, false);
 		nvme_reset(dev);
Signature · 1 line
2.5.5
#2 lore raw

PATCH 1/1 nvme/pci: Use saved CSTS value

Quoted 8 lines · Keith Busch

Don't re-read controller status when checking controller health on an IO timeout.

Signed-off-by Keith Busch <keith.busch at intel.com>

---
Note for Christoph: I planned to fold this into a v2 of the watchdog timer removal, but I see that was added in commit afd83d84461808, but under the wrong author. :)

Meh, damn git rebase messing up the author on conlicts one again. I'll fold the patch and will fix the author when doing the next rebase.

I still need a review for my 64-bit division fix before doing that rebase, though.