diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-08 18:07:16 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-08 18:07:16 +0200 |
commit | adfb8dff26976e201208f3f8ddc3cdc1d34cd8cb (patch) | |
tree | 1130e44b9e6f1d85a5f374bd3969d1051e68dd1b /sys/lib/python/threading.py | |
parent | fcd45e0cdd0591e11b876da4f378c0474c21475f (diff) |
nusb/kb: always try to recover on error, fix recover for multi-function devices
when we get an i/o error, always call hdrecover() which
will reset the port and reinitialize the interface of
the calling processes endpoint.
handle the case when we have multi-function device with
multiple reader procs in hdrecover(). the sequence is
as follows:
1) any of the reader procs encounters i/o error and calls hdrecover(),
acquires qlock and initiates port reset.
2) any other readerprocs will now encounter i/o error (due to reset) and also call
hdrecover() but will be waiting on the qlock for reset to complete.
3) first process completes reset and reinitializes its interface with setproto()
and then releases the qlock for the other readers todo the same.
Diffstat (limited to 'sys/lib/python/threading.py')
0 files changed, 0 insertions, 0 deletions