diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/af9015.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/af9015.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index e1e9aa5c6b84..6a97a40d3dfb 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c | |||
@@ -694,7 +694,12 @@ static int af9015_read_config(struct usb_device *udev) | |||
694 | 694 | ||
695 | /* IR remote controller */ | 695 | /* IR remote controller */ |
696 | req.addr = AF9015_EEPROM_IR_MODE; | 696 | req.addr = AF9015_EEPROM_IR_MODE; |
697 | ret = af9015_rw_udev(udev, &req); | 697 | /* first message will timeout often due to possible hw bug */ |
698 | for (i = 0; i < 4; i++) { | ||
699 | ret = af9015_rw_udev(udev, &req); | ||
700 | if (!ret) | ||
701 | break; | ||
702 | } | ||
698 | if (ret) | 703 | if (ret) |
699 | goto error; | 704 | goto error; |
700 | deb_info("%s: IR mode:%d\n", __func__, val); | 705 | deb_info("%s: IR mode:%d\n", __func__, val); |
@@ -835,18 +840,19 @@ static int af9015_read_config(struct usb_device *udev) | |||
835 | if (!dvb_usb_af9015_dual_mode) | 840 | if (!dvb_usb_af9015_dual_mode) |
836 | af9015_config.dual_mode = 0; | 841 | af9015_config.dual_mode = 0; |
837 | 842 | ||
838 | /* set buffer size according to USB port speed */ | 843 | /* Set adapter0 buffer size according to USB port speed, adapter1 buffer |
844 | size can be static because it is enabled only USB2.0 */ | ||
839 | for (i = 0; i < af9015_properties_count; i++) { | 845 | for (i = 0; i < af9015_properties_count; i++) { |
840 | /* USB1.1 set smaller buffersize and disable 2nd adapter */ | 846 | /* USB1.1 set smaller buffersize and disable 2nd adapter */ |
841 | if (udev->speed == USB_SPEED_FULL) { | 847 | if (udev->speed == USB_SPEED_FULL) { |
842 | af9015_properties[i].adapter->stream.u.bulk.buffersize = | 848 | af9015_properties[i].adapter[0].stream.u.bulk.buffersize |
843 | TS_USB11_MAX_PACKET_SIZE; | 849 | = TS_USB11_MAX_PACKET_SIZE; |
844 | /* disable 2nd adapter because we don't have | 850 | /* disable 2nd adapter because we don't have |
845 | PID-filters */ | 851 | PID-filters */ |
846 | af9015_config.dual_mode = 0; | 852 | af9015_config.dual_mode = 0; |
847 | } else { | 853 | } else { |
848 | af9015_properties[i].adapter->stream.u.bulk.buffersize = | 854 | af9015_properties[i].adapter[0].stream.u.bulk.buffersize |
849 | TS_USB20_MAX_PACKET_SIZE; | 855 | = TS_USB20_MAX_PACKET_SIZE; |
850 | } | 856 | } |
851 | } | 857 | } |
852 | 858 | ||
@@ -1254,6 +1260,12 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1254 | .type = USB_BULK, | 1260 | .type = USB_BULK, |
1255 | .count = 6, | 1261 | .count = 6, |
1256 | .endpoint = 0x85, | 1262 | .endpoint = 0x85, |
1263 | .u = { | ||
1264 | .bulk = { | ||
1265 | .buffersize = | ||
1266 | TS_USB20_MAX_PACKET_SIZE, | ||
1267 | } | ||
1268 | } | ||
1257 | }, | 1269 | }, |
1258 | } | 1270 | } |
1259 | }, | 1271 | }, |
@@ -1353,6 +1365,12 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1353 | .type = USB_BULK, | 1365 | .type = USB_BULK, |
1354 | .count = 6, | 1366 | .count = 6, |
1355 | .endpoint = 0x85, | 1367 | .endpoint = 0x85, |
1368 | .u = { | ||
1369 | .bulk = { | ||
1370 | .buffersize = | ||
1371 | TS_USB20_MAX_PACKET_SIZE, | ||
1372 | } | ||
1373 | } | ||
1356 | }, | 1374 | }, |
1357 | } | 1375 | } |
1358 | }, | 1376 | }, |