diff mbox

it913x [BUG] Enable endpoint 3 on devices with HID interface.

Message ID 1350766995.3089.2.camel@Route3278 (mailing list archive)
State New, archived
Headers show

Commit Message

Malcolm Priestley Oct. 20, 2012, 9:03 p.m. UTC
On some USB controllers when endpoint 3 (used by HID) is not enabled
this causes a USB reset.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/media/usb/dvb-usb-v2/it913x.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Comments

Mauro Carvalho Chehab Oct. 28, 2012, 6:59 p.m. UTC | #1
Em Sat, 20 Oct 2012 22:03:15 +0100
Malcolm Priestley <tvboxspy@gmail.com> escreveu:

> 
> On some USB controllers when endpoint 3 (used by HID) is not enabled
> this causes a USB reset.
> 
> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>

Hi Malcolm,

Patch looks ok. Yet, your name is missed at MAINTAINERS file.

Please add it there, as otherwise I may not c/c (or wait for your
reviews) on other patches that might arrive for the drivers you
maintain.

As a reference, that's the syntax I use locally when checking if
a driver has an active maintainer:
	./scripts/get_maintainer.pl --no-git-fallback --no-l < patch

Thanks,
Mauro

> ---
>  drivers/media/usb/dvb-usb-v2/it913x.c |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/usb/dvb-usb-v2/it913x.c b/drivers/media/usb/dvb-usb-v2/it913x.c
> index 695f910..4498f60 100644
> --- a/drivers/media/usb/dvb-usb-v2/it913x.c
> +++ b/drivers/media/usb/dvb-usb-v2/it913x.c
> @@ -659,13 +659,19 @@ static int it913x_frontend_attach(struct dvb_usb_adapter *adap)
>  		it913x_wr_reg(d, DEV_0_DMOD, MP2IF2_SW_RST, 0x1);
>  		it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x0f);
>  		it913x_wr_reg(d, DEV_0, EP0_TX_NAK, 0x1b);
> -		it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x2f);
> +		if (st->proprietary_ir == false) /* Enable endpoint 3 */
> +			it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x3f);
> +		else
> +			it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x2f);
>  		it913x_wr_reg(d, DEV_0, EP4_TX_LEN_LSB,
>  					ep_size & 0xff);
>  		it913x_wr_reg(d, DEV_0, EP4_TX_LEN_MSB, ep_size >> 8);
>  		ret = it913x_wr_reg(d, DEV_0, EP4_MAX_PKT, pkt_size);
>  	} else if (adap->id == 1 && adap->fe[0]) {
> -		it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x6f);
> +		if (st->proprietary_ir == false)
> +			it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x7f);
> +		else
> +			it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x6f);
>  		it913x_wr_reg(d, DEV_0, EP5_TX_LEN_LSB,
>  					ep_size & 0xff);
>  		it913x_wr_reg(d, DEV_0, EP5_TX_LEN_MSB, ep_size >> 8);
diff mbox

Patch

diff --git a/drivers/media/usb/dvb-usb-v2/it913x.c b/drivers/media/usb/dvb-usb-v2/it913x.c
index 695f910..4498f60 100644
--- a/drivers/media/usb/dvb-usb-v2/it913x.c
+++ b/drivers/media/usb/dvb-usb-v2/it913x.c
@@ -659,13 +659,19 @@  static int it913x_frontend_attach(struct dvb_usb_adapter *adap)
 		it913x_wr_reg(d, DEV_0_DMOD, MP2IF2_SW_RST, 0x1);
 		it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x0f);
 		it913x_wr_reg(d, DEV_0, EP0_TX_NAK, 0x1b);
-		it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x2f);
+		if (st->proprietary_ir == false) /* Enable endpoint 3 */
+			it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x3f);
+		else
+			it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x2f);
 		it913x_wr_reg(d, DEV_0, EP4_TX_LEN_LSB,
 					ep_size & 0xff);
 		it913x_wr_reg(d, DEV_0, EP4_TX_LEN_MSB, ep_size >> 8);
 		ret = it913x_wr_reg(d, DEV_0, EP4_MAX_PKT, pkt_size);
 	} else if (adap->id == 1 && adap->fe[0]) {
-		it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x6f);
+		if (st->proprietary_ir == false)
+			it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x7f);
+		else
+			it913x_wr_reg(d, DEV_0, EP0_TX_EN, 0x6f);
 		it913x_wr_reg(d, DEV_0, EP5_TX_LEN_LSB,
 					ep_size & 0xff);
 		it913x_wr_reg(d, DEV_0, EP5_TX_LEN_MSB, ep_size >> 8);