Return-Path: Received: from omzsmtpe02.verizonbusiness.com ([199.249.25.209]:61391 "EHLO omzsmtpe02.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753727AbdJGWjF (ORCPT ); Sat, 7 Oct 2017 18:39:05 -0400 From: "Levin, Alexander (Sasha Levin)" Cc: Oleh Kravchenko , Mauro Carvalho Chehab , "Levin, Alexander (Sasha Levin)" To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH review for 4.4 12/24] [media] cx231xx: Fix I2C on Internal Master 3 Bus Date: Sat, 7 Oct 2017 22:37:46 +0000 Message-ID: <20171007223738.25013-12-alexander.levin@verizon.com> References: <20171007223738.25013-1-alexander.levin@verizon.com> In-Reply-To: <20171007223738.25013-1-alexander.levin@verizon.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Oleh Kravchenko [ Upstream commit 6c5da8031a3abfad259190d35f83d89568b72ee2 ] Internal Master 3 Bus can send and receive only 4 bytes per time. Signed-off-by: Oleh Kravchenko Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- 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/c= x231xx/cx231xx-core.c index 19b0293312a0..07670117f922 100644 --- a/drivers/media/usb/cx231xx/cx231xx-core.c +++ b/drivers/media/usb/cx231xx/cx231xx-core.c @@ -356,7 +356,12 @@ int cx231xx_send_vendor_cmd(struct cx231xx *dev, */ if ((ven_req->wLength > 4) && ((ven_req->bRequest =3D=3D 0x4) || (ven_req->bRequest =3D=3D 0x5) || - (ven_req->bRequest =3D=3D 0x6))) { + (ven_req->bRequest =3D=3D 0x6) || + + /* Internal Master 3 Bus can send + * and receive only 4 bytes per time + */ + (ven_req->bRequest =3D=3D 0x2))) { unsend_size =3D 0; pdata =3D ven_req->pBuff; =20 --=20 2.11.0