From 6bbe7cdfb27e4e94cf07adb966c881a35284aedc Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Mon, 2 Jan 2012 20:28:33 +0000 Subject: [PATCH] Make sure we probe and attach the root HUB after resume else no devices will appear again. MFC after: 1 day --- sys/dev/usb/controller/usb_controller.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/usb/controller/usb_controller.c b/sys/dev/usb/controller/usb_controller.c index 1a387de779d1..0f942e1cdb53 100644 --- a/sys/dev/usb/controller/usb_controller.c +++ b/sys/dev/usb/controller/usb_controller.c @@ -473,10 +473,18 @@ usb_bus_resume(struct usb_proc_msg *pm) if (bus->methods->set_hw_power != NULL) (bus->methods->set_hw_power) (bus); + /* restore USB configuration to index 0 */ err = usbd_set_config_index(udev, 0); if (err) device_printf(bus->bdev, "Could not configure root HUB\n"); + /* probe and attach */ + err = usb_probe_and_attach(udev, USB_IFACE_INDEX_ANY); + if (err) { + device_printf(bus->bdev, "Could not probe and " + "attach root HUB\n"); + } + usbd_enum_unlock(udev); USB_BUS_LOCK(bus);