From patchwork Tue Feb 7 19:34:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleh Kravchenko X-Patchwork-Id: 9560939 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 60A8D6047A for ; Tue, 7 Feb 2017 19:35:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51C552847C for ; Tue, 7 Feb 2017 19:35:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4331128488; Tue, 7 Feb 2017 19:35:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01B512847C for ; Tue, 7 Feb 2017 19:35:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754923AbdBGTes (ORCPT ); Tue, 7 Feb 2017 14:34:48 -0500 Received: from smtp.220.in.ua ([89.184.67.205]:33680 "EHLO smtp.220.in.ua" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751743AbdBGTeM (ORCPT ); Tue, 7 Feb 2017 14:34:12 -0500 Received: from oleh-pc.lan (unknown [109.251.9.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by smtp.220.in.ua (Postfix) with ESMTPSA id 73DFB1A2241E; Tue, 7 Feb 2017 21:34:08 +0200 (EET) From: Oleh Kravchenko To: Linux Media Mailing List , Steven Toth , Jacob Johan Verkuil , Antti Palosaari Cc: Oleh Kravchenko Subject: [PATCH] [media] cx231xx: Fix I2C on Internal Master 3 Bus Date: Tue, 7 Feb 2017 21:34:07 +0200 Message-Id: <20170207193407.14815-1-oleg@kaa.org.ua> X-Mailer: git-send-email 2.10.2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Internal Master 3 Bus can send and receive only 4 bytes per time. Signed-off-by: Oleh Kravchenko --- drivers/media/usb/cx231xx/cx231xx-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c b/drivers/media/usb/cx231xx/cx231xx-core.c index 550ec93..46646ec 100644 --- a/drivers/media/usb/cx231xx/cx231xx-core.c +++ b/drivers/media/usb/cx231xx/cx231xx-core.c @@ -355,7 +355,12 @@ int cx231xx_send_vendor_cmd(struct cx231xx *dev, */ if ((ven_req->wLength > 4) && ((ven_req->bRequest == 0x4) || (ven_req->bRequest == 0x5) || - (ven_req->bRequest == 0x6))) { + (ven_req->bRequest == 0x6) || + + /* Internal Master 3 Bus can send + * and receive only 4 bytes per time + */ + (ven_req->bRequest == 0x2))) { unsend_size = 0; pdata = ven_req->pBuff;