diff --git a/sys/dev/nvme/nvme_pci.c b/sys/dev/nvme/nvme_pci.c index 448bfda6a718..e609967b53fe 100644 --- a/sys/dev/nvme/nvme_pci.c +++ b/sys/dev/nvme/nvme_pci.c @@ -90,6 +90,7 @@ static struct _pcsid { 0x05401c5f, 0, 0, "Memblaze Pblaze4", QUIRK_DELAY_B4_CHK_RDY }, { 0xa821144d, 0, 0, "Samsung PM1725", QUIRK_DELAY_B4_CHK_RDY }, { 0xa822144d, 0, 0, "Samsung PM1725a", QUIRK_DELAY_B4_CHK_RDY }, + { 0x2005106b, 0, 0, "ANS2 NVMe Controller" }, { 0x00000000, 0, 0, NULL } }; @@ -267,7 +268,7 @@ nvme_ctrlr_setup_interrupts(struct nvme_controller *ctrlr) force_intx = 0; TUNABLE_INT_FETCH("hw.nvme.force_intx", &force_intx); - if (force_intx || pci_msix_count(dev) < 2) { + if (force_intx) { nvme_ctrlr_configure_intx(ctrlr); return; } @@ -297,9 +298,14 @@ nvme_ctrlr_setup_interrupts(struct nvme_controller *ctrlr) /* One vector for per core I/O queue, plus one vector for admin queue. */ num_vectors_requested = num_io_queues + 1; num_vectors_allocated = num_vectors_requested; + + /* Try MSI-X */ if (pci_alloc_msix(dev, &num_vectors_allocated) != 0) { - nvme_ctrlr_configure_intx(ctrlr); - return; + /* MSI-X failed, try MSI */ + if (pci_alloc_msi(dev, &num_vectors_allocated) != 0) { + nvme_ctrlr_configure_intx(ctrlr); + return; + } } if (num_vectors_allocated < 2) { pci_release_msi(dev);