[Linux1394-cvslog] rev 665 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <dm...@li...> - 2002-11-07 04:03:44
|
Author: dmaas Date: 2002-11-06 23:03:39 -0500 (Wed, 06 Nov 2002) New Revision: 665 Modified: trunk/dv1394.c Log: dv1394 - sync DMA mapping of packet earlier in the IR tasklet Modified: trunk/dv1394.c ============================================================================== --- trunk/dv1394.c (original) +++ trunk/dv1394.c 2002-11-06 23:03:40.000000000 -0500 @@ -2306,7 +2306,12 @@ /* loop over all descriptors in all frames */ for (i = 0; i < video->n_frames*MAX_PACKETS; i++) { struct packet *p = dma_region_i(&video->packet_buf, struct packet, video->current_packet); - + + /* make sure we are seeing the latest changes to p */ + dma_region_sync(&video->packet_buf, + (unsigned long) p - (unsigned long) video->packet_buf.kvirt, + sizeof(struct packet)); + packet_length = le16_to_cpu(p->data_length); packet_time = le16_to_cpu(p->timestamp); @@ -2370,16 +2375,10 @@ if (f->n_packets > (video->frame_size / 480)) { printk(KERN_ERR "frame buffer overflow during receive\n"); } - - /* make sure we are seeing the latest changes to packet_buf */ - dma_region_sync(&video->packet_buf, - (unsigned long) p - (unsigned long) video->packet_buf.kvirt, - sizeof(struct packet)); frame_put_packet(f, p); } /* first_frame */ - } /* stop, end of ready packets */ |