Page MenuHomeFreeBSD

D7803.id20231.diff
No OneTemporary

D7803.id20231.diff

Index: share/man/man9/device_quiet.9
===================================================================
--- share/man/man9/device_quiet.9
+++ share/man/man9/device_quiet.9
@@ -49,16 +49,18 @@
Each device has a quiet flag associated with it.
A device is
verbose by default when it is created but may be quieted to prevent
-the device identification string to be printed during probe.
+printing of the device identification string during attach
+and printing of a message during detach.
To quiet a device, call
-.Fn device_quiet ,
-to re-enable to probe message (to make the message appear again, for
-example after a
-.Xr device_detach 9 )
+.Fn device_quiet
+during a device driver probe routine.
+To re-enable probe messages,
call
.Fn device_verbose .
To test to see if a device is quieted, call
.Fn device_is_quiet .
+.Pp
+Devices are implicitly marked verbose after a driver detaches.
.Sh SEE ALSO
.Xr device 9
.Sh AUTHORS
Index: sys/dev/cxgbe/t4_iov.c
===================================================================
--- sys/dev/cxgbe/t4_iov.c
+++ sys/dev/cxgbe/t4_iov.c
@@ -217,7 +217,6 @@
if (error)
return (error);
}
- device_verbose(dev);
return (0);
}
Index: sys/kern/subr_bus.c
===================================================================
--- sys/kern/subr_bus.c
+++ sys/kern/subr_bus.c
@@ -2146,6 +2146,12 @@
}
/*
+ * Reset DF_QUIET in case this driver doesn't
+ * end up as the best driver.
+ */
+ device_verbose(child);
+
+ /*
* Probes that return BUS_PROBE_NOWILDCARD or lower
* only match on devices whose driver was explicitly
* specified.
@@ -2970,6 +2976,7 @@
if (!(dev->flags & DF_FIXEDCLASS))
devclass_delete_device(dev->devclass, dev);
+ device_verbose(dev);
dev->state = DS_NOTPRESENT;
(void)device_set_driver(dev, NULL);
device_sysctl_fini(dev);

File Metadata

Mime Type
text/plain
Expires
Fri, Jun 12, 7:50 AM (7 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33902603
Default Alt Text
D7803.id20231.diff (1 KB)

Event Timeline