Page MenuHomeFreeBSD

Make device_quiet() an attachment property.
ClosedPublic

Authored by jhb on Sep 7 2016, 12:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 30 2024, 10:55 AM
Unknown Object (File)
Sep 30 2024, 2:43 AM
Unknown Object (File)
Sep 21 2024, 1:29 PM
Unknown Object (File)
Sep 20 2024, 11:21 AM
Unknown Object (File)
Sep 17 2024, 6:35 PM
Unknown Object (File)
Sep 8 2024, 8:42 PM
Unknown Object (File)
Sep 8 2024, 2:54 AM
Unknown Object (File)
Sep 7 2024, 12:50 PM
Subscribers

Details

Summary

Make device_quiet() an attachment property.

In particular, reset the DF_QUIET flag when detaching from a device so
that a driver that marks a device quiet doesn't dictate policy for a
different driver that may claim the device in the future.

Remove explicit device_verbose() from the t4iov driver detach routine
now that this case is handled generically.

Test Plan
  • Use 'devctl set driver' to flip t5iov devices over to ppt and then back again via 'devctl clear driver'. The ppt driver messages were always displayed, but not the t5iov messages.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Make device_quiet() an attachment property..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: imp.
rpokala added inline comments.
share/man/man9/device_quiet.9
56 ↗(On Diff #20119)

Does this need to be during probe, or can it be toggled later? If the latter, please re-word accordingly.

wblock added inline comments.
share/man/man9/device_quiet.9
53 ↗(On Diff #20119)

This second "printing of" is redundant.

57 ↗(On Diff #20119)

Needs a comma after "messages".

jhb edited edge metadata.
  • Add a comma.
jhb marked an inline comment as done.Sep 9 2016, 6:08 PM
jhb added inline comments.
share/man/man9/device_quiet.9
56 ↗(On Diff #20119)

While it can be toggled later it is mostly useless to do so. In particular, device_quiet() hides two messages, the 'foo0 <blah blah> memory xxxxx at device X.Y on pciZ' message during attach and the 'foo0 detached' message during detach. The attach message is printed before the device_attach() method in the device driver is invoked, so the only way a device driver can hide that message is to call device_quiet() earlier in device_probe(). Given that, while it is is theoretically possible to toggle it later, that would seem to be pretty pointless as it would only toggle the detached message, not the attach message.

wblock added a reviewer: wblock.

Thank you!

This revision is now accepted and ready to land.Sep 9 2016, 11:38 PM
rpokala added a reviewer: rpokala.
rpokala added inline comments.
share/man/man9/device_quiet.9
56 ↗(On Diff #20119)

Fair enough. APPROVED.

This revision was automatically updated to reflect the committed changes.