firewire: ohci: wait for local CSR lock access to finish
commite1393667be574807a13bfaf1bb471f5fd1a5287b
authorClemens Ladisch <clemens@ladisch.de>
Mon, 12 Apr 2010 08:35:44 +0000 (12 10:35 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 19 Apr 2010 17:58:32 +0000 (19 19:58 +0200)
tree5f2084f1a5099062cb27e74765ec3cd8a69c3489
parent2608203daf5f87311c6e5d36e5de5efcb14aab24
firewire: ohci: wait for local CSR lock access to finish

Add a loop to wait for the controller to finish a locally-initiated CSR
lock operation.  Google shows some occurrences of the "swap not done
yet" message which might indicate that some OHCI controllers are not
fast enough to do the lock/swap in the time needed for one PCI access.

This also correctly handles the case where the lock operation did not
finish, instead of silently returning an uninitialized value.

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