summaryrefslogtreecommitdiff
path: root/usr
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
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')
-rw-r--r--usr/src/cmd/bhyve/pci_xhci.c10
-rw-r--r--usr/src/man/man5/bhyve_config.56
2 files changed, 15 insertions, 1 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);
diff --git a/usr/src/man/man5/bhyve_config.5 b/usr/src/man/man5/bhyve_config.5
index 8cc7b56863..17788deaf8 100644
--- a/usr/src/man/man5/bhyve_config.5
+++ b/usr/src/man/man5/bhyve_config.5
@@ -25,7 +25,7 @@
.\"
.\" Portions Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
.\"
-.Dd February 26, 2022
+.Dd April 6, 2022
.Dt BHYVE_CONFIG 5
.Os
.Sh NAME
@@ -163,6 +163,10 @@ These messages are sent to
Enable debug messages relating to the RFB
.Pq VNC
server.
+.It Va xhci.debug Ta bool Ta false Ta
+Enable debug messages relating to the emulated XHCI
+.Pq USB
+controller.
These messages are sent to
.Dv stderr .
.El