Skip to content

Commit

Permalink
V4L/DVB: tm6000: Partially revert some copybuf logic
Browse files Browse the repository at this point in the history
Partially revert changeset 0208bef609242a2d50b95edc713a41566cae500b:

As pointed by Stefan Ringel <stefan.ringel@arcor.de>, many packets become
damaged by this change. That means that the "size" field of Video/VBI is not
presenting 180 bytes, as it should be expected.

Thanks-to: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Aug 2, 2010
1 parent 758bb0b commit ccfb302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/tm6000/tm6000-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@ static int copy_streams(u8 *data, unsigned long len,
break;
}
}
if (cpysize < size) {
if (ptr + pktsize > endp) {
/* End of URB packet, but cmd processing is not
* complete. Preserve the state for a next packet
*/
dev->isoc_ctl.pos = pos + cpysize;
dev->isoc_ctl.size = size - cpysize;
dev->isoc_ctl.cmd = cmd;
dev->isoc_ctl.pktsize = pktsize - (endp - ptr);
ptr += cpysize;
ptr += endp - ptr;
} else {
dev->isoc_ctl.cmd = 0;
ptr += pktsize;
Expand Down

0 comments on commit ccfb302

Please sign in to comment.