]> git.karo-electronics.de Git - linux-beck.git/commitdiff
V4L/DVB: dvb-usb: enable specifying a separate generic bulk ctrl response endpoint
authorMichael Krufky <mkrufky@kernellabs.com>
Mon, 1 Feb 2010 00:06:10 +0000 (21:06 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 18 May 2010 03:47:06 +0000 (00:47 -0300)
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>
drivers/media/dvb/dvb-usb/dvb-usb-urb.c
drivers/media/dvb/dvb-usb/dvb-usb.h

index 6fe71c6745eb64c266db61147ef16f58128e7a41..bb46ba6a35739d042ef133faf435c549e1b66e9a 100644 (file)
@@ -42,6 +42,8 @@ int dvb_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf,
                        msleep(delay_ms);
 
                ret = usb_bulk_msg(d->udev,usb_rcvbulkpipe(d->udev,
+                               d->props.generic_bulk_ctrl_endpoint_response ?
+                               d->props.generic_bulk_ctrl_endpoint_response :
                                d->props.generic_bulk_ctrl_endpoint),rbuf,rlen,&actlen,
                                2000);
 
index 0143aef19ecdde0e03d2c7e9a4b39eee72fe40e8..4a9f676087bff9e41740db3cde331db4fbe7d05b 100644 (file)
@@ -198,6 +198,12 @@ struct dvb_usb_adapter_properties {
  *  is non-zero, one can use dvb_usb_generic_rw and dvb_usb_generic_write-
  *  helper functions.
  *
+ * @generic_bulk_ctrl_endpoint_response: some DVB USB devices use a separate
+ *  endpoint for responses to control messages sent with bulk transfers via
+ *  the generic_bulk_ctrl_endpoint. When this is non-zero, this will be used
+ *  instead of the generic_bulk_ctrl_endpoint when reading usb responses in
+ *  the dvb_usb_generic_rw helper function.
+ *
  * @num_device_descs: number of struct dvb_usb_device_description in @devices
  * @devices: array of struct dvb_usb_device_description compatibles with these
  *  properties.
@@ -239,6 +245,7 @@ struct dvb_usb_device_properties {
        struct i2c_algorithm *i2c_algo;
 
        int generic_bulk_ctrl_endpoint;
+       int generic_bulk_ctrl_endpoint_response;
 
        int num_device_descs;
        struct dvb_usb_device_description devices[12];