From 08b9a6d74ea0b8105936ccfbb8265b1bda5867f4 Mon Sep 17 00:00:00 2001 From: Alex Woods Date: Tue, 13 Jan 2004 22:52:22 +0000 Subject: Fix USB timeout bug under 2.6. Use standard naming scheme firmwares for 2.4 build and update docs accordingly. --- linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c index bb70b7e65..0a2b388d8 100644 --- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c @@ -802,6 +802,7 @@ static int ttusb_dec_set_interface(struct ttusb_dec *dec, enum ttusb_dec_interface interface) { int result = 0; + u8 b[] = { 0x05 }; if (interface != dec->interface) { switch (interface) { @@ -809,6 +810,10 @@ static int ttusb_dec_set_interface(struct ttusb_dec *dec, result = usb_set_interface(dec->udev, 0, 0); break; case TTUSB_DEC_INTERFACE_IN: + result = ttusb_dec_send_command(dec, 0x80, sizeof(b), + b, NULL, NULL); + if (result) + return result; result = usb_set_interface(dec->udev, 0, 7); break; case TTUSB_DEC_INTERFACE_OUT: @@ -821,6 +826,7 @@ static int ttusb_dec_set_interface(struct ttusb_dec *dec, dec->interface = interface; } + return 0; } @@ -865,10 +871,6 @@ static int ttusb_dec_start_iso_xfer(struct ttusb_dec *dec) up(&dec->iso_sem); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - ttusb_dec_set_interface(dec, TTUSB_DEC_INTERFACE_IN); -#endif - return 0; } @@ -1786,11 +1788,11 @@ static int ttusb_dec_probe(struct usb_interface *intf, dec->active = 1; + ttusb_dec_set_interface(dec, TTUSB_DEC_INTERFACE_IN); + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) return (void *)dec; #else - ttusb_dec_set_interface(dec, TTUSB_DEC_INTERFACE_IN); - return 0; #endif } -- cgit v1.2.3