diff options
author | Michael Krufky <mkrufky@kernellabs.com> | 2010-01-31 19:06:10 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-17 23:47:06 -0400 |
commit | 4605664bd94ed94ab65a00bc7c749704304cfd40 (patch) | |
tree | 05397774fa18a130567e36610bbd75852f3649f6 /drivers/media/dvb/dvb-usb | |
parent | 727e625cc2c114e449a78f851b0c12edac897a83 (diff) |
V4L/DVB: dvb-usb: enable specifying a separate generic bulk ctrl response endpoint
Some DVB USB devices use a separate endpoint for responses to control
messages sent with bulk transfers via the generic_bulk_ctrl_endpoint.
When generic_bulk_ctrl_endpoint_response is set, it will be used instead
of the generic_bulk_ctrl_endpoint when reading usb responses in the
dvb_usb_generic_rw helper function.
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Reviewed-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-urb.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb.h | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-urb.c b/drivers/media/dvb/dvb-usb/dvb-usb-urb.c index 6fe71c6745eb..bb46ba6a3573 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-urb.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-urb.c | |||
@@ -42,6 +42,8 @@ int dvb_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf, | |||
42 | msleep(delay_ms); | 42 | msleep(delay_ms); |
43 | 43 | ||
44 | ret = usb_bulk_msg(d->udev,usb_rcvbulkpipe(d->udev, | 44 | ret = usb_bulk_msg(d->udev,usb_rcvbulkpipe(d->udev, |
45 | d->props.generic_bulk_ctrl_endpoint_response ? | ||
46 | d->props.generic_bulk_ctrl_endpoint_response : | ||
45 | d->props.generic_bulk_ctrl_endpoint),rbuf,rlen,&actlen, | 47 | d->props.generic_bulk_ctrl_endpoint),rbuf,rlen,&actlen, |
46 | 2000); | 48 | 2000); |
47 | 49 | ||
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index 0143aef19ecd..4a9f676087bf 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h | |||
@@ -198,6 +198,12 @@ struct dvb_usb_adapter_properties { | |||
198 | * is non-zero, one can use dvb_usb_generic_rw and dvb_usb_generic_write- | 198 | * is non-zero, one can use dvb_usb_generic_rw and dvb_usb_generic_write- |
199 | * helper functions. | 199 | * helper functions. |
200 | * | 200 | * |
201 | * @generic_bulk_ctrl_endpoint_response: some DVB USB devices use a separate | ||
202 | * endpoint for responses to control messages sent with bulk transfers via | ||
203 | * the generic_bulk_ctrl_endpoint. When this is non-zero, this will be used | ||
204 | * instead of the generic_bulk_ctrl_endpoint when reading usb responses in | ||
205 | * the dvb_usb_generic_rw helper function. | ||
206 | * | ||
201 | * @num_device_descs: number of struct dvb_usb_device_description in @devices | 207 | * @num_device_descs: number of struct dvb_usb_device_description in @devices |
202 | * @devices: array of struct dvb_usb_device_description compatibles with these | 208 | * @devices: array of struct dvb_usb_device_description compatibles with these |
203 | * properties. | 209 | * properties. |
@@ -239,6 +245,7 @@ struct dvb_usb_device_properties { | |||
239 | struct i2c_algorithm *i2c_algo; | 245 | struct i2c_algorithm *i2c_algo; |
240 | 246 | ||
241 | int generic_bulk_ctrl_endpoint; | 247 | int generic_bulk_ctrl_endpoint; |
248 | int generic_bulk_ctrl_endpoint_response; | ||
242 | 249 | ||
243 | int num_device_descs; | 250 | int num_device_descs; |
244 | struct dvb_usb_device_description devices[12]; | 251 | struct dvb_usb_device_description devices[12]; |