summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-10-26 13:10:55 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-10-26 13:10:55 +0000
commitb38c9a6d077809c53dd48fac3d862df8f5aac26a (patch)
tree8335b16163eda3374913192a28a0718a36297529 /linux
parentfe05a74ed6f5c14a69fb574abf2f85c713888f72 (diff)
downloadmediapointer-dvb-s2-b38c9a6d077809c53dd48fac3d862df8f5aac26a.tar.gz
mediapointer-dvb-s2-b38c9a6d077809c53dd48fac3d862df8f5aac26a.tar.bz2
- Improved isoc error detection.
Thanks-to: Stefan Kristiansson <stefan@langante.mine.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-core.c13
-rw-r--r--linux/drivers/usb/media/em2820-core.c13
2 files changed, 22 insertions, 4 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-core.c b/linux/drivers/media/video/em28xx/em28xx-core.c
index 1dc2a16d9..ce110cc96 100644
--- a/linux/drivers/media/video/em28xx/em28xx-core.c
+++ b/linux/drivers/media/video/em28xx/em28xx-core.c
@@ -581,8 +581,16 @@ static inline void em2820_isoc_video_copy(struct em2820 *dev,
if ((*f)->fieldbytesused + len > dev->field_size)
len =dev->field_size - (*f)->fieldbytesused;
+
+ if (buf[0] != 0x88 && buf[0] != 0x22) {
+ em2820_isocdbg("frame is not complete\n");
+ startread = buf;
+ len+=4;
+ } else
+ startread = buf + 4;
+
remain = len;
- startread = buf + 4;
+
if ((*f)->top_field)
fieldstart = (*f)->bufmem;
else
@@ -661,7 +669,8 @@ void em2820_isocIrq(struct urb *urb, struct pt_regs *regs)
em2820_isocdbg("data error: [%d] len=%d, status=%d", i,
urb->iso_frame_desc[i].actual_length,
urb->iso_frame_desc[i].status);
- continue;
+ if (urb->iso_frame_desc[i].status != -EPROTO)
+ continue;
}
if (urb->iso_frame_desc[i].actual_length <= 0) {
em2820_isocdbg("packet %d is empty",i);
diff --git a/linux/drivers/usb/media/em2820-core.c b/linux/drivers/usb/media/em2820-core.c
index 1dc2a16d9..ce110cc96 100644
--- a/linux/drivers/usb/media/em2820-core.c
+++ b/linux/drivers/usb/media/em2820-core.c
@@ -581,8 +581,16 @@ static inline void em2820_isoc_video_copy(struct em2820 *dev,
if ((*f)->fieldbytesused + len > dev->field_size)
len =dev->field_size - (*f)->fieldbytesused;
+
+ if (buf[0] != 0x88 && buf[0] != 0x22) {
+ em2820_isocdbg("frame is not complete\n");
+ startread = buf;
+ len+=4;
+ } else
+ startread = buf + 4;
+
remain = len;
- startread = buf + 4;
+
if ((*f)->top_field)
fieldstart = (*f)->bufmem;
else
@@ -661,7 +669,8 @@ void em2820_isocIrq(struct urb *urb, struct pt_regs *regs)
em2820_isocdbg("data error: [%d] len=%d, status=%d", i,
urb->iso_frame_desc[i].actual_length,
urb->iso_frame_desc[i].status);
- continue;
+ if (urb->iso_frame_desc[i].status != -EPROTO)
+ continue;
}
if (urb->iso_frame_desc[i].actual_length <= 0) {
em2820_isocdbg("packet %d is empty",i);