From patchwork Sat Oct 20 21:03:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 1622081 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A43A740135 for ; Sat, 20 Oct 2012 21:03:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751850Ab2JTVDX (ORCPT ); Sat, 20 Oct 2012 17:03:23 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:57758 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751003Ab2JTVDW (ORCPT ); Sat, 20 Oct 2012 17:03:22 -0400 Received: by mail-ee0-f46.google.com with SMTP id b15so560505eek.19 for ; Sat, 20 Oct 2012 14:03:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:date:content-type:x-mailer:mime-version :content-transfer-encoding; bh=C7XF5jx3teDuAu7YL+LWFc+HdYaOz0CVAtNW39gjnGg=; b=ULaWRMEpl+3vsn06gAAMASt9fnlZMh5nze0ic2A2258ygNgxsyML55StLRnrmn2Pui o4k9+5yMLlA7UX5xVxWISzXwmfwaD2KQLawR5euLCB6RJpy5vEl08zlIaTSI8j6j1uWN /vVaQnshYJ5HtVJCztas2g0TvxO7WCcNUGaz2GxP8vk8LWM3wzZAMHBCrllY5LzCGVlE AD+Y1HZQXXJSghXMAhnv/vEprmgrH8fTwslrBT2TNhRfNkHpYGKLYHRIgGju1khMskYo Ryus8a/LayedRh2WDTj3gKBOpc0RiW1nf0o5De4olPfE960/GagmiAh1gI6qVnaAx9Ko b9eQ== Received: by 10.14.4.201 with SMTP id 49mr6775160eej.0.1350767001654; Sat, 20 Oct 2012 14:03:21 -0700 (PDT) Received: from [94.197.239.113] (94.197.239.113.threembb.co.uk. [94.197.239.113]) by mx.google.com with ESMTPS id s1sm8622254eem.9.2012.10.20.14.03.19 (version=SSLv3 cipher=OTHER); Sat, 20 Oct 2012 14:03:20 -0700 (PDT) Message-ID: <1350766995.3089.2.camel@Route3278> Subject: [PATCH] it913x [BUG] Enable endpoint 3 on devices with HID interface. From: Malcolm Priestley To: linux-media@vger.kernel.org Date: Sat, 20 Oct 2012 22:03:15 +0100 X-Mailer: Evolution 3.6.0-0ubuntu3 Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On some USB controllers when endpoint 3 (used by HID) is not enabled this causes a USB reset. Signed-off-by: Malcolm Priestley --- 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);