Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jan 2012 08:31:47 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r229369 - stable/9/sys/dev/usb/controller
Message-ID:  <201201030831.q038Vl6Q012629@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Jan  3 08:31:47 2012
New Revision: 229369
URL: http://svn.freebsd.org/changeset/base/229369

Log:
  MFC r229317:
  Fix for USB suspend and resume.

Modified:
  stable/9/sys/dev/usb/controller/usb_controller.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- stable/9/sys/dev/usb/controller/usb_controller.c	Tue Jan  3 07:14:01 2012	(r229368)
+++ stable/9/sys/dev/usb/controller/usb_controller.c	Tue Jan  3 08:31:47 2012	(r229369)
@@ -472,10 +472,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201030831.q038Vl6Q012629>