aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2013-03-27 15:07:41 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-28 17:39:44 -0400
commit72cc9ba39a046132a638888eaa5a14baf55621b2 (patch)
treef1ce5f038ea212167e46009d5d78cf1f291df411 /drivers/media/usb
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')
-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,
3357 dev->analog_ep_bulk = 3357 dev->analog_ep_bulk =
3358 e->bEndpointAddress; 3358 e->bEndpointAddress;
3359 } else { 3359 } else {
3360 has_dvb = true;
3361 if (usb_endpoint_xfer_isoc(e)) { 3360 if (usb_endpoint_xfer_isoc(e)) {
3362 dev->dvb_ep_isoc = e->bEndpointAddress; 3361 dev->dvb_ep_isoc = e->bEndpointAddress;
3363 if (size > dev->dvb_max_pkt_size_isoc) { 3362 if (size > dev->dvb_max_pkt_size_isoc) {
3363 has_dvb = true; /* see NOTE (~) */
3364 dev->dvb_max_pkt_size_isoc = size; 3364 dev->dvb_max_pkt_size_isoc = size;
3365 dev->dvb_alt_isoc = i; 3365 dev->dvb_alt_isoc = i;
3366 } 3366 }
3367 } else { 3367 } else {
3368 has_dvb = true;
3368 dev->dvb_ep_bulk = e->bEndpointAddress; 3369 dev->dvb_ep_bulk = e->bEndpointAddress;
3369 } 3370 }
3370 } 3371 }
@@ -3391,6 +3392,12 @@ static int em28xx_usb_probe(struct usb_interface *interface,
3391 * so far. But there might be devices for which this 3392 * so far. But there might be devices for which this
3392 * logic is not sufficient... 3393 * logic is not sufficient...
3393 */ 3394 */
3395 /*
3396 * NOTE (~): some manufacturers (e.g. Terratec) disable
3397 * endpoints by setting wMaxPacketSize to 0 bytes for
3398 * all alt settings. So far, we've seen this for
3399 * DVB isoc endpoints only.
3400 */
3394 } 3401 }
3395 } 3402 }
3396 3403