summaryrefslogtreecommitdiff
path: root/sys/lib/python/threading.py
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-04-08 18:07:16 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-04-08 18:07:16 +0200
commitadfb8dff26976e201208f3f8ddc3cdc1d34cd8cb (patch)
tree1130e44b9e6f1d85a5f374bd3969d1051e68dd1b /sys/lib/python/threading.py
parentfcd45e0cdd0591e11b876da4f378c0474c21475f (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