diff options
author | marius <marius@FreeBSD.org> | 2014-06-23 08:27:15 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2014-06-23 08:27:15 +0000 |
commit | e7db5d1d1043b1e42ee1d16d4d29cefe04b874d3 (patch) | |
tree | 1fce0d219a2c26d28797e9a6be7ed597d12877e1 | |
parent | bab6ec90432d9079a3d4e3ee74d12c4aa53cac75 (diff) | |
download | FreeBSD-src-e7db5d1d1043b1e42ee1d16d4d29cefe04b874d3.zip FreeBSD-src-e7db5d1d1043b1e42ee1d16d4d29cefe04b874d3.tar.gz |
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
-rw-r--r-- | sys/dev/usb/controller/usb_controller.c | 5 | ||||
-rw-r--r-- | sys/dev/usb/usb_device.c | 16 |
2 files changed, 13 insertions, 8 deletions
diff --git a/sys/dev/usb/controller/usb_controller.c b/sys/dev/usb/controller/usb_controller.c index 0464b3d..3eba27e 100644 --- a/sys/dev/usb/controller/usb_controller.c +++ b/sys/dev/usb/controller/usb_controller.c @@ -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); } diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index 33dfd03..f1497dd 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -1124,10 +1124,12 @@ usb_detach_device_sub(struct usb_device *udev, device_t *ppdev, */ *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, uint8_t flag) #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) { |