]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: core: make transaction label allocation more robust
authorClemens Ladisch <clemens@ladisch.de>
Mon, 19 Apr 2010 15:29:14 +0000 (17:29 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 19 Apr 2010 18:00:44 +0000 (20:00 +0200)
commit6d0e2ccc9d5dc7855d827407c7bc876ea511c440
tree0645ad88ab8ad5cd98ce3cef95655ccc5bca0ef8
parent5a96ae1eb8341674d36c82a044d111cbed8fe243
firewire: core: make transaction label allocation more robust

If one request is so long-lived that it does not get a response before
the following 63 requests, its bit in tlabel_mask is still set when the
next request tries to allocate a transaction label for that number.  In
this state, while the first request is not completed or timed out, no
new requests can be submitted.

To fix this, skip over any label still in use, and do not error out
unless we have entirely run out of labels.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/core-transaction.c