summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2013-03-27 16:07:41 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-28 18:39:44 -0300
commit72cc9ba39a046132a638888eaa5a14baf55621b2 (patch)
treef1ce5f038ea212167e46009d5d78cf1f291df411 /drivers/media/usb/em28xx
parentb41869711586b047c18435ba84baf334918bae01 (diff)
[media] em28xx: ignore isoc DVB USB endpoints with wMaxPacketSize = 0 bytes for all alt settings
Some devices without DVB support (such as the "Terratec Grabby" and "Easycap DC-60") provide isochronous DVB USB endpoints with wMaxPacketSize set to 0 bytes for all alt settings. Ignore these endpoints and avoid registering a DVB device node and loading the DVB driver extension. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Tested-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/em28xx')
-rw-r--r--drivers/media/usb/em28xx/em28xx-cards.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index 54e0362d8e3d..096206334134 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -3357,14 +3357,15 @@ static int em28xx_usb_probe(struct usb_interface *interface,
dev->analog_ep_bulk =
e->bEndpointAddress;
} else {
- has_dvb = true;
if (usb_endpoint_xfer_isoc(e)) {
dev->dvb_ep_isoc = e->bEndpointAddress;
if (size > dev->dvb_max_pkt_size_isoc) {
+ has_dvb = true; /* see NOTE (~) */
dev->dvb_max_pkt_size_isoc = size;
dev->dvb_alt_isoc = i;
}
} else {
+ has_dvb = true;
dev->dvb_ep_bulk = e->bEndpointAddress;
}
}
@@ -3391,6 +3392,12 @@ static int em28xx_usb_probe(struct usb_interface *interface,
* so far. But there might be devices for which this
* logic is not sufficient...
*/
+ /*
+ * NOTE (~): some manufacturers (e.g. Terratec) disable
+ * endpoints by setting wMaxPacketSize to 0 bytes for
+ * all alt settings. So far, we've seen this for
+ * DVB isoc endpoints only.
+ */
}
}