summaryrefslogtreecommitdiff
path: root/drivers/firewire/ohci.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2011-01-01 17:15:40 +0300
committerStefan Richter <stefanr@s5r6.in-berlin.de>2011-01-04 10:48:33 +0300
commit78dec56d6a56322e1b728d51f3a7def416d36b34 (patch)
treececebe0b2376af8a774172286d4682bc5a697bfc /drivers/firewire/ohci.c
parent82b662dc41027527675740de15344d1b4e34958e (diff)
downloadlinux-78dec56d6a56322e1b728d51f3a7def416d36b34.tar.xz
firewire: ohci: flush AT contexts after bus reset - addendum
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>
Diffstat (limited to 'drivers/firewire/ohci.c')
-rw-r--r--drivers/firewire/ohci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 3372cd187c25..cfe5afe359c6 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -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);