svn commit: r229317 - head/sys/dev/usb/controller
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Jan 2 20:28:33 UTC 2012
Author: hselasky
Date: Mon Jan 2 20:28:33 2012
New Revision: 229317
URL: http://svn.freebsd.org/changeset/base/229317
Log:
Make sure we probe and attach the root HUB after
resume else no devices will appear again.
MFC after: 1 day
Modified:
head/sys/dev/usb/controller/usb_controller.c
Modified: head/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- head/sys/dev/usb/controller/usb_controller.c Mon Jan 2 19:55:59 2012 (r229316)
+++ head/sys/dev/usb/controller/usb_controller.c Mon Jan 2 20:28:33 2012 (r229317)
@@ -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);
More information about the svn-src-all
mailing list