Commit cb2d2cdb authored by Kristian Høgsberg's avatar Kristian Høgsberg Committed by Stefan Richter

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: default avatarKristian Høgsberg <krh@redhat.com>
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent d2746dc1
...@@ -1621,15 +1621,15 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base, ...@@ -1621,15 +1621,15 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
page_bus = page_private(buffer->pages[page]); page_bus = page_private(buffer->pages[page]);
db->second_buffer = cpu_to_le32(page_bus + offset); db->second_buffer = cpu_to_le32(page_bus + offset);
if (p->interrupt && length == rest)
db->control |= cpu_to_le16(descriptor_irq_always);
context_append(&ctx->context, d, z, header_z); context_append(&ctx->context, d, z, header_z);
offset = (offset + length) & ~PAGE_MASK; offset = (offset + length) & ~PAGE_MASK;
rest -= length; rest -= length;
page++; page++;
} }
if (p->interrupt)
db->control |= cpu_to_le16(descriptor_irq_always);
return 0; return 0;
} }
...@@ -1668,6 +1668,9 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base, ...@@ -1668,6 +1668,9 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base,
d->req_count = cpu_to_le16(length); d->req_count = cpu_to_le16(length);
d->res_count = cpu_to_le16(length); d->res_count = cpu_to_le16(length);
if (packet->interrupt && length == rest)
d->control |= cpu_to_le16(descriptor_irq_always);
context_append(&ctx->context, d, 1, 0); context_append(&ctx->context, d, 1, 0);
offset = (offset + length) & ~PAGE_MASK; offset = (offset + length) & ~PAGE_MASK;
...@@ -1675,9 +1678,6 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base, ...@@ -1675,9 +1678,6 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base,
page++; page++;
} }
if (packet->interrupt)
d->control |= cpu_to_le16(descriptor_irq_always);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment