Date: Mon, 23 Jun 2014 08:27:15 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267775 - in stable/10/sys/dev/usb: . controller Message-ID: <201406230827.s5N8RFQ8091184@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Mon Jun 23 08:27:15 2014 New Revision: 267775 URL: http://svnweb.freebsd.org/changeset/base/267775 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/10/sys/dev/usb/controller/usb_controller.c stable/10/sys/dev/usb/usb_device.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/10/sys/dev/usb/controller/usb_controller.c Mon Jun 23 08:25:03 2014 (r267774) +++ stable/10/sys/dev/usb/controller/usb_controller.c Mon Jun 23 08:27:15 2014 (r267775) @@ -332,7 +332,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(USB_BUS_EXPLORE_PROC(bus), @@ -344,7 +344,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/10/sys/dev/usb/usb_device.c ============================================================================== --- stable/10/sys/dev/usb/usb_device.c Mon Jun 23 08:25:03 2014 (r267774) +++ stable/10/sys/dev/usb/usb_device.c Mon Jun 23 08:27:15 2014 (r267775) @@ -1124,10 +1124,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) { @@ -2143,8 +2145,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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406230827.s5N8RFQ8091184>