From patchwork Sun Jan 29 18:07:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleh Kravchenko X-Patchwork-Id: 9544251 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 0B20760488 for ; Sun, 29 Jan 2017 18:07:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE91A2723E for ; Sun, 29 Jan 2017 18:07:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E12D927F82; Sun, 29 Jan 2017 18:07:36 +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 92BEC2723E for ; Sun, 29 Jan 2017 18:07:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751382AbdA2SHf (ORCPT ); Sun, 29 Jan 2017 13:07:35 -0500 Received: from smtp.220.in.ua ([89.184.67.205]:33613 "EHLO smtp.220.in.ua" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751367AbdA2SHe (ORCPT ); Sun, 29 Jan 2017 13:07:34 -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 ADE1C1A243EA; Sun, 29 Jan 2017 20:07:32 +0200 (EET) From: Oleh Kravchenko To: Steven Toth , Linux Media Mailing List , Jacob Johan Verkuil , Antti Palosaari Cc: Oleh Kravchenko Subject: [PATCH] [media] cx231xx: Fix I2C on Internal Master 3 Bus Date: Sun, 29 Jan 2017 20:07:31 +0200 Message-Id: <20170129180731.8708-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;