Page MenuHomeFreeBSD

usb: Refactor usb_proc_msg
Needs ReviewPublic

Authored by aokblast on Tue, May 12, 2:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 14, 9:39 PM
Unknown Object (File)
Wed, May 13, 12:05 AM
Unknown Object (File)
Wed, May 13, 12:05 AM
Unknown Object (File)
Wed, May 13, 12:02 AM
Subscribers

Details

Reviewers
khorben
kevans
Summary

Previously, the USB async process implemented its own worker and event handling. This design allowed all USB code to hold the mutex while events were being processed. However, the async process is not used directly: transfer, enumeration, and initilization are all wrapped internally, so driver developers do not need to manage it themselves.

This change decouples the mutex from the USB sync thread, reducing the size of critical sections. The tradeoff is that any custom async thread implementation must now handle locking explicitly.

The implementation is also clearer by using taskqueue.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 73096
Build 69979: arc lint + arc unit