git: 3346ae0d24c0 - main - xhci(4): Don't allocate an IRQ vector if hw.usb.xhci.use_polling=1 is set.

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Thu, 20 Oct 2022 17:24:40 UTC
The branch main has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=3346ae0d24c072ef0e26ace3aae21bfef93d80aa

commit 3346ae0d24c072ef0e26ace3aae21bfef93d80aa
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-10-20 17:21:53 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-10-20 17:23:42 +0000

    xhci(4): Don't allocate an IRQ vector if hw.usb.xhci.use_polling=1 is set.
    
    This is useful for debugging purposes.
    
    MFC after:      1 week
    Sponsored by:   NVIDIA Networking
---
 sys/dev/usb/controller/xhci_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c
index 95edb29422ed..890eec4f0169 100644
--- a/sys/dev/usb/controller/xhci_pci.c
+++ b/sys/dev/usb/controller/xhci_pci.c
@@ -402,7 +402,7 @@ xhci_pci_attach(device_t self)
 		break;
 	}
 
-	if (sc->sc_irq_res != NULL) {
+	if (sc->sc_irq_res != NULL && xhci_use_polling() == 0) {
 		err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
 		    NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl);
 		if (err != 0) {