Page MenuHomeFreeBSD

hidbus: stop interrupts before finalizing child deactivation
Needs ReviewPublic

Authored by kevans on Sun, Jul 12, 7:48 PM.

Details

Reviewers
wulf
aokblast
Summary

In the case of usbhid, the parent will drain any transfers that are
pending, which could lead to just a little bit of data being plumbed
through. Stop interrupts *before* we mark the child as inactive so that
anything that was inflight makes it through.

This primarily helps a little with debugging, so that we can tell if
data was dropped as a result of hid_intr_stop().

Diff Detail

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

Event Timeline

sys/dev/hid/hidbus.c
639

I can't understand. If it is the last bit. We should clear the bit then do foreach check? Or it will never deactive?