V4L/DVB: tm6000: Fix copybuf continue logic

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Mauro Carvalho Chehab 2010-06-07 12:10:14 -03:00
parent 23ba94633d
commit d0669c872f
1 changed files with 3 additions and 3 deletions

View File

@ -285,7 +285,7 @@ static int copy_streams(u8 *data, unsigned long len,
break; break;
case TM6000_URB_MSG_AUDIO: case TM6000_URB_MSG_AUDIO:
case TM6000_URB_MSG_PTS: case TM6000_URB_MSG_PTS:
cpysize = pktsize; /* Size is always 180 bytes */ size = pktsize; /* Size is always 180 bytes */
break; break;
} }
} else { } else {
@ -315,7 +315,7 @@ static int copy_streams(u8 *data, unsigned long len,
break; break;
} }
} }
if (ptr + pktsize > endp) { if (cpysize < size) {
/* 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
*/ */
@ -323,7 +323,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 += endp - ptr; ptr += cpysize;
} else { } else {
dev->isoc_ctl.cmd = 0; dev->isoc_ctl.cmd = 0;
ptr += pktsize; ptr += pktsize;