All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: TUR(Test unit Ready) broken for nvme drvices
@ 2017-06-05 15:39 wenxiong
  2017-06-05 17:44 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: wenxiong @ 2017-06-05 15:39 UTC (permalink / raw)


From: Wen Xiong <wenxiong@linux.vnet.ibm.com>

When doing sg_turs over nvme devices, we got the following errors.
The patch fixes the issue.
dd if=/dev/nvme0n1 of=/dev/null bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.000994747 s, 1.1 GB/s

sg_turs /dev/nvme0n1
device not ready

Signed-off-by: Wen Xiong <wenxiong at linux.vnet.ibm.com>
---
 drivers/nvme/host/scsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/nvme/host/scsi.c b/drivers/nvme/host/scsi.c
index 1f7671e..af27930 100644
--- a/drivers/nvme/host/scsi.c
+++ b/drivers/nvme/host/scsi.c
@@ -2208,7 +2208,7 @@ static int nvme_trans_test_unit_ready(struct nvme_ns *ns,
 					struct sg_io_hdr *hdr,
 					u8 *cmd)
 {
-	if (nvme_ctrl_ready(ns->ctrl))
+	if (!nvme_ctrl_ready(ns->ctrl))
 		return nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION,
 					    NOT_READY, SCSI_ASC_LUN_NOT_READY,
 					    SCSI_ASCQ_CAUSE_NOT_REPORTABLE);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] nvme: TUR(Test unit Ready) broken for nvme drvices
  2017-06-05 15:39 [PATCH] nvme: TUR(Test unit Ready) broken for nvme drvices wenxiong
@ 2017-06-05 17:44 ` Christoph Hellwig
  2017-06-12 15:23   ` Keith Busch
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2017-06-05 17:44 UTC (permalink / raw)


Given how broken the emulation was we should simply remove it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] nvme: TUR(Test unit Ready) broken for nvme drvices
  2017-06-12 15:23   ` Keith Busch
@ 2017-06-12 15:17     ` Jens Axboe
  0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2017-06-12 15:17 UTC (permalink / raw)


On 06/12/2017 09:23 AM, Keith Busch wrote:
> On Mon, Jun 05, 2017@10:44:54AM -0700, Christoph Hellwig wrote:
>> Given how broken the emulation was we should simply remove it.
> 
> Agreed!

I'm fine with killing it as well. On the FB infrastructure side, one of
the first things I did wrt nvme was ensure that we don't rely on or use
the scsi emulation at all.

And honestly, if even TUR is broken...

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] nvme: TUR(Test unit Ready) broken for nvme drvices
  2017-06-05 17:44 ` Christoph Hellwig
@ 2017-06-12 15:23   ` Keith Busch
  2017-06-12 15:17     ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Busch @ 2017-06-12 15:23 UTC (permalink / raw)


On Mon, Jun 05, 2017@10:44:54AM -0700, Christoph Hellwig wrote:
> Given how broken the emulation was we should simply remove it.

Agreed!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-12 15:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-05 15:39 [PATCH] nvme: TUR(Test unit Ready) broken for nvme drvices wenxiong
2017-06-05 17:44 ` Christoph Hellwig
2017-06-12 15:23   ` Keith Busch
2017-06-12 15:17     ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.