]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
firewire: ohci: flush AT contexts after bus reset - addendum
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 1 Jan 2011 14:15:40 +0000 (15:15 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 4 Jan 2011 07:48:33 +0000 (08:48 +0100)
Add comments
  - on why bus_reset_tasklet flushes AT queues,
  - that commit 76f73ca1b291 can possibly be reverted now.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Jarod Wilson <jarod@redhat.com>
drivers/firewire/ohci.c

index 3372cd187c258d766033b3feb9d672693c15cdec..cfe5afe359c6a8677a0f6b40804984c96ae09d05 100644 (file)
@@ -1336,6 +1336,8 @@ static int at_context_queue_packet(struct context *ctx,
         * some controllers (like a JMicron JMB381 PCI-e) misbehave and wind
         * up stalling out.  So we just bail out in software and try again
         * later, and everyone is happy.
+        * FIXME: Test of IntEvent.busReset may no longer be necessary since we
+        *        flush AT queues in bus_reset_tasklet.
         * FIXME: Document how the locking works.
         */
        if (ohci->generation != packet->generation ||
@@ -1750,6 +1752,11 @@ static void bus_reset_tasklet(unsigned long data)
 
        spin_unlock_irqrestore(&ohci->lock, flags);
 
+       /*
+        * Per OHCI 1.2 draft, clause 7.2.3.3, hardware may leave unsent
+        * packets in the AT queues and software needs to drain them.
+        * Some OHCI 1.1 controllers (JMicron) apparently require this too.
+        */
        at_context_flush(&ohci->at_request_ctx);
        at_context_flush(&ohci->at_response_ctx);