From: sathya.prakash@broadcom.com (Sathya Prakash Veerichetty)
Subject: Test Unit Ready translation seems wrong in latest driver
Date: Mon, 24 Jul 2017 15:52:16 -0600 [thread overview]
Message-ID: <706a68b8482154bdf77efe7fb195fe24@mail.gmail.com> (raw)
The TUR translation returns LUN not ready when the controller is ready in
the latest code whereas in the old code it returns LUN not ready only when
the controller is not ready (proper behavior).
The patch [PATCH 11/47] nvme: split a new struct nvme_ctrl out of struct
nvme_dev seeded the issue by missing the !.
@@ -2295,9 +2288,7 @@ static int nvme_trans_test_unit_ready(struct nvme_ns
*ns,
struct sg_io_hdr *hdr,
u8 *cmd)
{
- struct nvme_dev *dev = ns->dev;
-
- if (!(readl(dev->bar + NVME_REG_CSTS) & NVME_CSTS_RDY))
+ 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);
Thanks
Sathya
next reply other threads:[~2017-07-24 21:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-24 21:52 Sathya Prakash Veerichetty [this message]
2017-07-24 22:01 ` Test Unit Ready translation seems wrong in latest driver Keith Busch
2017-07-24 22:21 ` Sathya Prakash Veerichetty
2017-07-24 22:45 ` 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=706a68b8482154bdf77efe7fb195fe24@mail.gmail.com \
--to=sathya.prakash@broadcom.com \
/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 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.