From: Shane Michael Matthews Date: Tue, 1 Feb 2011 16:31:55 +0000 (-0500) Subject: NVMe: Disable the device before we write the admin queues X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5911f20039ce59d7e7834f0c42151cf759b6f786;p=linux-beck.git NVMe: Disable the device before we write the admin queues In case the card has been left in a partially-configured state, write 0 to the Enable bit. Signed-off-by: Shane Michael Matthews Signed-off-by: Matthew Wilcox --- diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c index bda91178f475..e3d921577b94 100644 --- a/drivers/block/nvme.c +++ b/drivers/block/nvme.c @@ -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);