firewire: ohci: prevent starting of iso contexts with empty queue
commit44b74d909dc943fd9384930a141450cb17133511
authorClemens Ladisch <clemens@ladisch.de>
Wed, 23 Feb 2011 08:27:40 +0000 (23 09:27 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 26 Feb 2011 14:11:04 +0000 (26 15:11 +0100)
tree19861b5b1213d6f0e9571f6c640095f7d74b642c
parente81cbebdfc384f9c2ae91225f16ef994118e5e2c
firewire: ohci: prevent starting of iso contexts with empty queue

If a misguided program tried to start an isochronous context before it
has queued any packets, the call would appear to succeed, but the
context would not actually go into the running state, and the OHCI
controller would then raise an unrecoverableError interrupt because the
first Z value is zero and thus invalid.  The driver logs such errors,
but there is no mechanism to report this back to the program.

Add an explicit check so that this error can be returned synchronously.

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