svn commit: r267777 - in stable/9/sys/dev/usb: . controller

Marius Strobl marius at FreeBSD.org
Mon Jun 23 08:28:15 UTC 2014


Author: marius
Date: Mon Jun 23 08:28:14 2014
New Revision: 267777
URL: http://svnweb.freebsd.org/changeset/base/267777

Log:
  MFC: r267321
  
  Avoid the USB device disconnected and controller shutdown clutter on system
  shutdown by putting the former under !rebooting and turning the latter into
  debug messages.
  
  Reviewed by:	hps
  Sponsored by:	Bally Wulff Games & Entertainment GmbH

Modified:
  stable/9/sys/dev/usb/controller/usb_controller.c
  stable/9/sys/dev/usb/usb_device.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- stable/9/sys/dev/usb/controller/usb_controller.c	Mon Jun 23 08:27:27 2014	(r267776)
+++ stable/9/sys/dev/usb/controller/usb_controller.c	Mon Jun 23 08:28:14 2014	(r267777)
@@ -314,7 +314,7 @@ usb_shutdown(device_t dev)
 		return (0);
 	}
 
-	device_printf(bus->bdev, "Controller shutdown\n");
+	DPRINTF("%s: Controller shutdown\n", device_get_nameunit(bus->bdev));
 
 	USB_BUS_LOCK(bus);
 	usb_proc_msignal(&bus->explore_proc,
@@ -326,7 +326,8 @@ usb_shutdown(device_t dev)
 	}
 	USB_BUS_UNLOCK(bus);
 
-	device_printf(bus->bdev, "Controller shutdown complete\n");
+	DPRINTF("%s: Controller shutdown complete\n",
+	    device_get_nameunit(bus->bdev));
 
 	return (0);
 }

Modified: stable/9/sys/dev/usb/usb_device.c
==============================================================================
--- stable/9/sys/dev/usb/usb_device.c	Mon Jun 23 08:27:27 2014	(r267776)
+++ stable/9/sys/dev/usb/usb_device.c	Mon Jun 23 08:28:14 2014	(r267777)
@@ -1094,10 +1094,12 @@ usb_detach_device_sub(struct usb_device 
 		 */
 		*ppdev = NULL;
 
-		device_printf(dev, "at %s, port %d, addr %d "
-		    "(disconnected)\n",
-		    device_get_nameunit(udev->parent_dev),
-		    udev->port_no, udev->address);
+		if (!rebooting) {
+			device_printf(dev, "at %s, port %d, addr %d "
+			    "(disconnected)\n",
+			    device_get_nameunit(udev->parent_dev),
+			    udev->port_no, udev->address);
+		}
 
 		if (device_is_attached(dev)) {
 			if (udev->flags.peer_suspended) {
@@ -2109,8 +2111,10 @@ usb_free_device(struct usb_device *udev,
 #endif
 
 #if USB_HAVE_UGEN
-	printf("%s: <%s> at %s (disconnected)\n", udev->ugen_name,
-	    usb_get_manufacturer(udev), device_get_nameunit(bus->bdev));
+	if (!rebooting) {
+		printf("%s: <%s> at %s (disconnected)\n", udev->ugen_name,
+		    usb_get_manufacturer(udev), device_get_nameunit(bus->bdev));
+	}
 
 	/* Destroy UGEN symlink, if any */
 	if (udev->ugen_symlink) {


More information about the svn-src-stable-9 mailing list