diff options
Diffstat (limited to 'sys/dev/usb/controller/xhci_pci.c')
-rw-r--r-- | sys/dev/usb/controller/xhci_pci.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c index 359f14bb1e3c..b50e33ea36ce 100644 --- a/sys/dev/usb/controller/xhci_pci.c +++ b/sys/dev/usb/controller/xhci_pci.c @@ -25,7 +25,6 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> #include <sys/stdint.h> #include <sys/stddef.h> #include <sys/param.h> @@ -100,6 +99,9 @@ xhci_pci_match(device_t self) return ("AMD Starship USB 3.0 controller"); case 0x149c1022: return ("AMD Matisse USB 3.0 controller"); + case 0x15e01022: + case 0x15e11022: + return ("AMD Raven USB 3.1 controller"); case 0x43ba1022: return ("AMD X399 USB 3.0 controller"); case 0x43b91022: /* X370 */ @@ -386,7 +388,7 @@ xhci_pci_attach(device_t self) device_printf(self, "Could not allocate IRQ\n"); /* goto error; FALLTHROUGH - use polling */ } - sc->sc_bus.bdev = device_add_child(self, "usbus", -1); + sc->sc_bus.bdev = device_add_child(self, "usbus", DEVICE_UNIT_ANY); if (sc->sc_bus.bdev == NULL) { device_printf(self, "Could not add USB device\n"); goto error; @@ -462,9 +464,12 @@ static int xhci_pci_detach(device_t self) { struct xhci_softc *sc = device_get_softc(self); + int error; /* during module unload there are lots of children leftover */ - device_delete_children(self); + error = bus_generic_detach(self); + if (error != 0) + return (error); usb_callout_drain(&sc->sc_callout); xhci_halt_controller(sc); |