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)
Dec 22 2023, 9:20 PM
Unknown Object (File)
Dec 9 2023, 12:01 AM
Unknown Object (File)
Nov 8 2023, 6:43 PM
Unknown Object (File)
Nov 6 2023, 9:34 PM
Unknown Object (File)
Nov 6 2023, 6:27 PM
Unknown Object (File)
Nov 6 2023, 2:46 PM
Unknown Object (File)
Oct 30 2023, 10:45 PM
Unknown Object (File)
Oct 5 2023, 8:33 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.