summaryrefslogtreecommitdiff
path: root/usr/src/cmd/bhyve
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2022-04-23 11:04:47 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2022-04-23 21:17:48 +0000
commit104fd2955714fa4ea6ed431b6b5cf2eb0766ecad (patch)
treec3e25cad9463d693117d88f36d335b2edd664a98 /usr/src/cmd/bhyve
parent77570342d4bf7e1e439bf1b8008312de7f031a0a (diff)
downloadillumos-joyent-104fd2955714fa4ea6ed431b6b5cf2eb0766ecad.tar.gz
14623 bhyve/xhci: Connecting device on port 1 failed
Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Rich Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/cmd/bhyve')
-rw-r--r--usr/src/cmd/bhyve/pci_xhci.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/src/cmd/bhyve/pci_xhci.c b/usr/src/cmd/bhyve/pci_xhci.c
index 97ce582772..0b9fde3208 100644
--- a/usr/src/cmd/bhyve/pci_xhci.c
+++ b/usr/src/cmd/bhyve/pci_xhci.c
@@ -483,8 +483,13 @@ pci_xhci_portregs_write(struct pci_xhci_softc *sc, uint64_t offset,
oldpls = XHCI_PS_PLS_GET(p->portsc);
newpls = XHCI_PS_PLS_GET(value);
+#ifndef __FreeBSD__
+ p->portsc &= XHCI_PS_PED | XHCI_PS_PP | XHCI_PS_PLS_MASK |
+ XHCI_PS_SPEED_MASK | XHCI_PS_PIC_MASK;
+#else
p->portsc &= XHCI_PS_PED | XHCI_PS_PLS_MASK |
XHCI_PS_SPEED_MASK | XHCI_PS_PIC_MASK;
+#endif
if (XHCI_DEVINST_PTR(sc, port))
p->portsc |= XHCI_PS_CCS;
@@ -2852,6 +2857,11 @@ pci_xhci_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl)
struct pci_xhci_softc *sc;
int error;
+#ifndef __FreeBSD__
+ if (get_config_bool_default("xhci.debug", false))
+ xhci_debug = 1;
+#endif
+
if (xhci_in_use) {
WPRINTF(("pci_xhci controller already defined"));
return (-1);