diff options
-rw-r--r-- | drivers/media/dvb/dvb-usb/af9015.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index e1e9aa5c6b84..dbeaf79defd8 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c | |||
@@ -835,18 +835,19 @@ static int af9015_read_config(struct usb_device *udev) | |||
835 | if (!dvb_usb_af9015_dual_mode) | 835 | if (!dvb_usb_af9015_dual_mode) |
836 | af9015_config.dual_mode = 0; | 836 | af9015_config.dual_mode = 0; |
837 | 837 | ||
838 | /* set buffer size according to USB port speed */ | 838 | /* Set adapter0 buffer size according to USB port speed, adapter1 buffer |
839 | size can be static because it is enabled only USB2.0 */ | ||
839 | for (i = 0; i < af9015_properties_count; i++) { | 840 | for (i = 0; i < af9015_properties_count; i++) { |
840 | /* USB1.1 set smaller buffersize and disable 2nd adapter */ | 841 | /* USB1.1 set smaller buffersize and disable 2nd adapter */ |
841 | if (udev->speed == USB_SPEED_FULL) { | 842 | if (udev->speed == USB_SPEED_FULL) { |
842 | af9015_properties[i].adapter->stream.u.bulk.buffersize = | 843 | af9015_properties[i].adapter[0].stream.u.bulk.buffersize |
843 | TS_USB11_MAX_PACKET_SIZE; | 844 | = TS_USB11_MAX_PACKET_SIZE; |
844 | /* disable 2nd adapter because we don't have | 845 | /* disable 2nd adapter because we don't have |
845 | PID-filters */ | 846 | PID-filters */ |
846 | af9015_config.dual_mode = 0; | 847 | af9015_config.dual_mode = 0; |
847 | } else { | 848 | } else { |
848 | af9015_properties[i].adapter->stream.u.bulk.buffersize = | 849 | af9015_properties[i].adapter[0].stream.u.bulk.buffersize |
849 | TS_USB20_MAX_PACKET_SIZE; | 850 | = TS_USB20_MAX_PACKET_SIZE; |
850 | } | 851 | } |
851 | } | 852 | } |
852 | 853 | ||
@@ -1254,6 +1255,12 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1254 | .type = USB_BULK, | 1255 | .type = USB_BULK, |
1255 | .count = 6, | 1256 | .count = 6, |
1256 | .endpoint = 0x85, | 1257 | .endpoint = 0x85, |
1258 | .u = { | ||
1259 | .bulk = { | ||
1260 | .buffersize = | ||
1261 | TS_USB20_MAX_PACKET_SIZE, | ||
1262 | } | ||
1263 | } | ||
1257 | }, | 1264 | }, |
1258 | } | 1265 | } |
1259 | }, | 1266 | }, |
@@ -1353,6 +1360,12 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1353 | .type = USB_BULK, | 1360 | .type = USB_BULK, |
1354 | .count = 6, | 1361 | .count = 6, |
1355 | .endpoint = 0x85, | 1362 | .endpoint = 0x85, |
1363 | .u = { | ||
1364 | .bulk = { | ||
1365 | .buffersize = | ||
1366 | TS_USB20_MAX_PACKET_SIZE, | ||
1367 | } | ||
1368 | } | ||
1356 | }, | 1369 | }, |
1357 | } | 1370 | } |
1358 | }, | 1371 | }, |