Commit ccfb3028 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB: tm6000: Partially revert some copybuf logic

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: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 758bb0b3
...@@ -314,7 +314,7 @@ static int copy_streams(u8 *data, unsigned long len, ...@@ -314,7 +314,7 @@ static int copy_streams(u8 *data, unsigned long len,
break; break;
} }
} }
if (cpysize < size) { if (ptr + pktsize > endp) {
/* End of URB packet, but cmd processing is not /* End of URB packet, but cmd processing is not
* complete. Preserve the state for a next packet * complete. Preserve the state for a next packet
*/ */
...@@ -322,7 +322,7 @@ static int copy_streams(u8 *data, unsigned long len, ...@@ -322,7 +322,7 @@ static int copy_streams(u8 *data, unsigned long len,
dev->isoc_ctl.size = size - cpysize; dev->isoc_ctl.size = size - cpysize;
dev->isoc_ctl.cmd = cmd; dev->isoc_ctl.cmd = cmd;
dev->isoc_ctl.pktsize = pktsize - (endp - ptr); dev->isoc_ctl.pktsize = pktsize - (endp - ptr);
ptr += cpysize; ptr += endp - ptr;
} else { } else {
dev->isoc_ctl.cmd = 0; dev->isoc_ctl.cmd = 0;
ptr += pktsize; ptr += pktsize;
......
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