nvme: disable the controller from generating INTx# interrupts

Since we bind the NVMe device to UIO driver to protect against native
NVMe driver, but for Admin queue, there are still INTx interrupts
exist, as all the completion for Admin queue will be processed in
user space, so we don't need INTx anymore.

Change-Id: Ife5b3e410ae95690ed0f3f9a2f2dfaf55a7797b5
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Changpeng Liu 2016-08-17 14:17:17 +08:00 committed by Daniel Verkamp
parent 0d61bf4b50
commit dcf49aa018

View File

@ -1094,9 +1094,9 @@ nvme_ctrlr_construct(struct spdk_nvme_ctrlr *ctrlr, void *devhandle)
return status; return status;
} }
/* Enable PCI busmaster. */ /* Enable PCI busmaster and disable INTx */
nvme_pcicfg_read32(devhandle, &cmd_reg, 4); nvme_pcicfg_read32(devhandle, &cmd_reg, 4);
cmd_reg |= 0x4; cmd_reg |= 0x0404;
nvme_pcicfg_write32(devhandle, cmd_reg, 4); nvme_pcicfg_write32(devhandle, cmd_reg, 4);
cap.raw = nvme_mmio_read_8(ctrlr, cap.raw); cap.raw = nvme_mmio_read_8(ctrlr, cap.raw);