NVMe: Disable the device before we write the admin queues
authorShane Michael Matthews <shane.matthews@intel.com>
Tue, 1 Feb 2011 16:31:55 +0000 (11:31 -0500)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Fri, 4 Nov 2011 19:52:54 +0000 (15:52 -0400)
In case the card has been left in a partially-configured state,
write 0 to the Enable bit.

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

index bda91178f475068a03f3a8156826f8437a3fc0b8..e3d921577b949df33d9cdf8f2c326ef67f5b78b8 100644 (file)
@@ -668,6 +668,7 @@ static int __devinit nvme_configure_admin_queue(struct nvme_dev *dev)
        dev->ctrl_config |= (PAGE_SHIFT - 12) << NVME_CC_MPS_SHIFT;
        dev->ctrl_config |= NVME_CC_ARB_RR | NVME_CC_SHN_NONE;
 
+       writel(0, &dev->bar->cc);
        writel(aqa, &dev->bar->aqa);
        writeq(nvmeq->sq_dma_addr, &dev->bar->asq);
        writeq(nvmeq->cq_dma_addr, &dev->bar->acq);
This page took 0.02696 seconds and 5 git commands to generate.