aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew.r.wilcox@intel.com>2011-03-16 16:29:58 -0400
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2011-11-04 15:53:00 -0400
commitac88c36a385b848cb9efcb877fdfc4153a60bcab (patch)
treec175b977cdbd20c840049d16872566fef8311a53 /drivers/block
parent19e899b2f9f89f4a290dd5c9c24d15987a18ab21 (diff)
NVMe: Fix interpretation of 'Number of Namespaces' field
The spec says this is a 0s based value. We don't need to handle the maximal value because it's reserved to mean "every namespace". Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/nvme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index d4f95eb51dc1..0d5c918b7d59 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -1364,7 +1364,7 @@ static int __devinit nvme_dev_add(struct nvme_dev *dev)
1364 crt.features.prp1 = cpu_to_le64(dma_addr + 4096); 1364 crt.features.prp1 = cpu_to_le64(dma_addr + 4096);
1365 crt.features.fid = cpu_to_le32(NVME_FEAT_LBA_RANGE); 1365 crt.features.fid = cpu_to_le32(NVME_FEAT_LBA_RANGE);
1366 1366
1367 for (i = 0; i < nn; i++) { 1367 for (i = 0; i <= nn; i++) {
1368 cid.identify.nsid = cpu_to_le32(i); 1368 cid.identify.nsid = cpu_to_le32(i);
1369 res = nvme_submit_admin_cmd(dev, &cid, NULL); 1369 res = nvme_submit_admin_cmd(dev, &cid, NULL);
1370 if (res) 1370 if (res)