From e946f494b4d8877468825572a4d9a8baf12e7896 Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Mon, 19 Dec 2016 18:42:01 +0800 Subject: [PATCH] NVMe: don't try to read csts when failing to reset it We could find the external abort for trying to access nvme's BAR space to check the csts, but it's possible that the link state is forbidden to access the BAR when failing to reset it. So we should reuse the former csts to print the log instead of doing that again. Change-Id: I34438a726381e588eb21149b1aab76a66ef0e665 Signed-off-by: Shawn Lin --- drivers/nvme/host/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index c851bc53831c..8bb2c666eb4c 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2217,8 +2217,8 @@ static int nvme_kthread(void *data) csts & NVME_CSTS_CFS) { if (!__nvme_reset(dev)) { dev_warn(dev->dev, - "Failed status: %x, reset controller\n", - readl(&dev->bar->csts)); + "Failed status: 0x%x, reset controller\n", + csts); } continue; } -- 2.34.1