aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-02-16 17:34:47 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 16:03:02 -0500
commitcb2d2cdbc66d9143159ee0381ad83975de56a57d (patch)
treecb5431e87633b8c1b09667434ed331e37caee3f7
parentd2746dc192e8b9446ea1cb843e94c30f177b7e54 (diff)
firewire: Don't touch DMA descriptors after appending.
When a DMA descriptor is appended to the context we sync it for DMA and the device might potentially read it immediately. So, we can't set the IRQ bits in the descriptor after appending. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r--drivers/firewire/fw-ohci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index 9b9ea0f3c416..18769d906ca9 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -1621,15 +1621,15 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
1621 page_bus = page_private(buffer->pages[page]); 1621 page_bus = page_private(buffer->pages[page]);
1622 db->second_buffer = cpu_to_le32(page_bus + offset); 1622 db->second_buffer = cpu_to_le32(page_bus + offset);
1623 1623
1624 if (p->interrupt && length == rest)
1625 db->control |= cpu_to_le16(descriptor_irq_always);
1626
1624 context_append(&ctx->context, d, z, header_z); 1627 context_append(&ctx->context, d, z, header_z);
1625 offset = (offset + length) & ~PAGE_MASK; 1628 offset = (offset + length) & ~PAGE_MASK;
1626 rest -= length; 1629 rest -= length;
1627 page++; 1630 page++;
1628 } 1631 }
1629 1632
1630 if (p->interrupt)
1631 db->control |= cpu_to_le16(descriptor_irq_always);
1632
1633 return 0; 1633 return 0;
1634} 1634}
1635 1635
@@ -1668,6 +1668,9 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base,
1668 d->req_count = cpu_to_le16(length); 1668 d->req_count = cpu_to_le16(length);
1669 d->res_count = cpu_to_le16(length); 1669 d->res_count = cpu_to_le16(length);
1670 1670
1671 if (packet->interrupt && length == rest)
1672 d->control |= cpu_to_le16(descriptor_irq_always);
1673
1671 context_append(&ctx->context, d, 1, 0); 1674 context_append(&ctx->context, d, 1, 0);
1672 1675
1673 offset = (offset + length) & ~PAGE_MASK; 1676 offset = (offset + length) & ~PAGE_MASK;
@@ -1675,9 +1678,6 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base,
1675 page++; 1678 page++;
1676 } 1679 }
1677 1680
1678 if (packet->interrupt)
1679 d->control |= cpu_to_le16(descriptor_irq_always);
1680
1681 return 0; 1681 return 0;
1682} 1682}
1683 1683