Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174440354
D60274.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60274.diff
View Options
diff --git a/usr.sbin/bhyve/pci_xhci.c b/usr.sbin/bhyve/pci_xhci.c
--- a/usr.sbin/bhyve/pci_xhci.c
+++ b/usr.sbin/bhyve/pci_xhci.c
@@ -643,9 +643,18 @@
static void
pci_xhci_deassert_interrupt(struct pci_xhci_softc *sc)
{
+ uint32_t iman;
- if (!pci_msi_enabled(sc->xsc_pi))
- pci_lintr_assert(sc->xsc_pi);
+ /*
+ * INTx stays asserted only while interrupts are enabled (USBCMD.INTE)
+ * and the interrupter has an enabled interrupt pending (IMAN.IE and
+ * IMAN.IP).
+ */
+ iman = sc->rtsregs.intrreg.iman;
+ if ((sc->opregs.usbcmd & XHCI_CMD_INTE) == 0 ||
+ (iman & XHCI_IMAN_INTR_ENA) == 0 ||
+ (iman & XHCI_IMAN_INTR_PEND) == 0)
+ pci_lintr_deassert(sc->xsc_pi);
}
static void
@@ -2085,8 +2094,7 @@
rts->intrreg.iman = (value & XHCI_IMAN_INTR_ENA) |
(rts->intrreg.iman & XHCI_IMAN_INTR_PEND);
- if (!(value & XHCI_IMAN_INTR_ENA))
- pci_xhci_deassert_interrupt(sc);
+ pci_xhci_deassert_interrupt(sc);
break;
@@ -2233,6 +2241,7 @@
switch (offset) {
case XHCI_USBCMD:
sc->opregs.usbcmd = pci_xhci_usbcmd_write(sc, value & 0x3F0F);
+ pci_xhci_deassert_interrupt(sc);
break;
case XHCI_USBSTS:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 4, 5:57 AM (22 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40176057
Default Alt Text
D60274.diff (1 KB)
Attached To
Mode
D60274: bhyve: xhci: deassert INTx when no enabled interrupt is pending
Attached
Detach File
Event Timeline
Log In to Comment