Test Unit Ready translation seems wrong in latest driver
Sathya Prakash Veerichetty
sathya.prakash at broadcom.com
Mon Jul 24 14:52:16 PDT 2017
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
struct sg_io_hdr *hdr,
- struct nvme_dev *dev = ns->dev;
- if (!(readl(dev->bar + NVME_REG_CSTS) & NVME_CSTS_RDY))
+ if (nvme_ctrl_ready(ns->ctrl))
More information about the Linux-nvme