Commit e9820e41 authored by Kamal Mostafa's avatar Kamal Mostafa

UBUNTU: (fix) NVMe: Don't unmap controller registers on reset

BugLink: http://bugs.launchpad.net/bugs/1626894

Commit b00a726a upstream.

Fix nvme_pci_enable missing initializer accidentally omitted from Xenial
backport of 30d6592f "NVMe: Don't unmap controller registers on reset"
(and homogenize comment lines with the 4.4.y-stable tree).
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 16773b5c
......@@ -1726,6 +1726,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)
if (pci_enable_device_mem(pdev))
return result;
dev->entry[0].vector = pdev->irq;
pci_set_master(pdev);
if (dma_set_mask_and_coherent(dev->dev, DMA_BIT_MASK(64)) &&
......@@ -1738,9 +1739,8 @@ static int nvme_pci_enable(struct nvme_dev *dev)
}
/*
* Some devices and/or platforms don't advertise or work with INTx
* interrupts. Pre-enable a single MSIX or MSI vec for setup. We'll
* adjust this later.
* Some devices don't advertse INTx interrupts, pre-enable a single
* MSIX vec for setup. We'll adjust this later.
*/
if (!pdev->irq) {
result = pci_enable_msix(pdev, dev->entry, 1);
......@@ -1749,7 +1749,6 @@ static int nvme_pci_enable(struct nvme_dev *dev)
}
cap = lo_hi_readq(dev->bar + NVME_REG_CAP);
dev->q_depth = min_t(int, NVME_CAP_MQES(cap) + 1, NVME_Q_DEPTH);
dev->db_stride = 1 << NVME_CAP_STRIDE(cap);
dev->dbs = dev->bar + 4096;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment