NVMe: Don't probe namespace 0
authorMatthew Wilcox <matthew.r.wilcox@intel.com>
Fri, 7 Oct 2011 17:10:13 +0000 (13:10 -0400)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Fri, 4 Nov 2011 19:53:04 +0000 (15:53 -0400)
ECN 001 documented that namespace 0 is not valid.  Sending an Identify
with CNS of 0 and Namespace of 0 is an undefined command.

Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme.c

index 3afdc750aaa86b89aa84701d41e45d86ff421cf9..660aa5dfe569ef8b22169add43b8fe05cbd979d1 100644 (file)
@@ -1447,7 +1447,7 @@ static int __devinit nvme_dev_add(struct nvme_dev *dev)
        memcpy(dev->firmware_rev, ctrl->fr, sizeof(ctrl->fr));
 
        id_ns = mem;
-       for (i = 0; i <= nn; i++) {
+       for (i = 1; i <= nn; i++) {
                res = nvme_identify(dev, i, 0, dma_addr);
                if (res)
                        continue;