]> err.no Git - linux-2.6/commitdiff
firewire: Set correct buffer lengths for dualbuffer DMA descriptor.
authorKristian Høgsberg <krh@redhat.com>
Fri, 16 Feb 2007 22:34:45 +0000 (17:34 -0500)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Fri, 9 Mar 2007 21:03:01 +0000 (22:03 +0100)
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-ohci.c

index b5a154583e0d87ebf52988c91817f7fc916c2644..76ac70a385459940e7a26205d53dd05cfb8b1334 100644 (file)
@@ -1583,10 +1583,7 @@ ohci_queue_iso_receive(struct fw_iso_context *base,
                                          descriptor_branch_always);
                db->first_size = cpu_to_le16(ctx->base.header_size);
                db->first_req_count = cpu_to_le16(p->header_length);
-               db->second_req_count = cpu_to_le16(p->payload_length);
-               db->first_res_count = cpu_to_le16(db->first_req_count);
-               db->second_res_count = cpu_to_le16(db->second_req_count);
-
+               db->first_res_count = db->first_req_count;
                db->first_buffer = cpu_to_le32(d_bus + sizeof *db);
                
                if (offset + rest < PAGE_SIZE)
@@ -1594,6 +1591,8 @@ ohci_queue_iso_receive(struct fw_iso_context *base,
                else
                        length = PAGE_SIZE - offset;
 
+               db->second_req_count = cpu_to_le16(length);
+               db->second_res_count = db->second_req_count;
                page_bus = page_private(buffer->pages[page]);
                db->second_buffer = cpu_to_le32(page_bus + offset);