mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
nvme: do not touch INTMS/INTMC when configured for MSI-X
The single-vector MSI-X fallback installs the shared interrupt handler, which masks interrupts through INTMS/INTMC around the completion poll. INTx and MSI are unaffected. Only MSI-X track the interrupt mode and skip un/masking Reviewed by: ngie, imp, adrian Differential Revision: https://reviews.freebsd.org/D59637
This commit is contained in:
1 parent
ba974faaf3
commit
ad57f21266
3 files changed
+7
-2
No files matched your search
@@ -1405,9 +1405,12 @@ nvme_ctrlr_shared_handler(void *arg)
|
||||
{
|
||||
struct nvme_controller *ctrlr = arg;
|
||||
|
||||
nvme_mmio_write_4(ctrlr, intms, 1);
|
||||
/* INTMS/INTMC are undefined when configured for MSI-X. */
|
||||
if (!ctrlr->is_msix)
|
||||
nvme_mmio_write_4(ctrlr, intms, 1);
|
||||
nvme_ctrlr_poll(ctrlr);
|
||||
nvme_mmio_write_4(ctrlr, intmc, 1);
|
||||
if (!ctrlr->is_msix)
|
||||
nvme_mmio_write_4(ctrlr, intmc, 1);
|
||||
}
|
||||
|
||||
#define NVME_MAX_PAGES (int)(1024 / sizeof(vm_page_t))
|
||||
|
||||
@@ -385,6 +385,7 @@ again:
|
||||
ctrlr->msi_count = 0;
|
||||
goto msi;
|
||||
}
|
||||
ctrlr->is_msix = true;
|
||||
if (ctrlr->msi_count == 1)
|
||||
return (nvme_ctrlr_setup_shared(ctrlr, 1));
|
||||
if (ctrlr->msi_count != num_vectors_requested) {
|
||||
|
||||
@@ -257,6 +257,7 @@ struct nvme_controller {
|
||||
struct resource *msix_pba_resource;
|
||||
|
||||
int msi_count;
|
||||
bool is_msix;
|
||||
uint32_t enable_aborts;
|
||||
|
||||
uint32_t num_io_queues;
|
||||
|
||||
Reference in new issue
Block a user