svn commit: r302972 - head/usr.sbin/bhyve
Peter Grehan
grehan at FreeBSD.org
Sun Jul 17 20:34:47 UTC 2016
Author: grehan
Date: Sun Jul 17 20:34:46 2016
New Revision: 302972
URL: https://svnweb.freebsd.org/changeset/base/302972
Log:
Disallow interrupt requests on disabled endpoints.
Submitted by: Leon Dang
MFC after: 3 days
Modified:
head/usr.sbin/bhyve/pci_xhci.c
Modified: head/usr.sbin/bhyve/pci_xhci.c
==============================================================================
--- head/usr.sbin/bhyve/pci_xhci.c Sun Jul 17 19:24:28 2016 (r302971)
+++ head/usr.sbin/bhyve/pci_xhci.c Sun Jul 17 20:34:46 2016 (r302972)
@@ -2537,9 +2537,11 @@ static int
pci_xhci_dev_intr(struct usb_hci *hci, int epctx)
{
struct pci_xhci_dev_emu *dev;
+ struct xhci_dev_ctx *dev_ctx;
struct xhci_trb evtrb;
struct pci_xhci_softc *sc;
struct pci_xhci_portregs *p;
+ struct xhci_endp_ctx *ep_ctx;
int error;
int dir_in;
int epid;
@@ -2578,6 +2580,14 @@ pci_xhci_dev_intr(struct usb_hci *hci, i
goto done;
}
+ dev_ctx = dev->dev_ctx;
+ ep_ctx = &dev_ctx->ctx_ep[epid];
+ if ((ep_ctx->dwEpCtx0 & 0x7) == XHCI_ST_EPCTX_DISABLED) {
+ DPRINTF(("xhci device interrupt on disabled endpoint %d\r\n",
+ epid));
+ return (0);
+ }
+
DPRINTF(("xhci device interrupt on endpoint %d\r\n", epid));
pci_xhci_device_doorbell(sc, hci->hci_port, epid, 0);
More information about the svn-src-all
mailing list