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
MFC after:	1 week
Sponsored by:	Bally Wulff Games & Entertainment GmbH
This commit is contained in:
Marius Strobl 2014-06-10 08:20:00 +00:00
parent 198ebaa738
commit cabe79d9d8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=267321
2 changed files with 13 additions and 8 deletions

View File

@ -333,7 +333,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),
@ -345,7 +345,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);
}

View File

@ -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) {