From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-by2nam03on0101.outbound.protection.outlook.com ([104.47.42.101]:17968 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965057AbeCHE6O (ORCPT ); Wed, 7 Mar 2018 23:58:14 -0500 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Ron Economos , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 18/67] media: [RESEND] media: dvb-frontends: Add delay to Si2168 restart Date: Thu, 8 Mar 2018 04:57:39 +0000 Message-ID: <20180308045641.7814-18-alexander.levin@microsoft.com> References: <20180308045641.7814-1-alexander.levin@microsoft.com> In-Reply-To: <20180308045641.7814-1-alexander.levin@microsoft.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: Ron Economos [ Upstream commit 380a6c86457573aa42d27ae11e025eb25941a0b7 ] On faster CPUs a delay is required after the resume command and the restart= command. Without the delay, the restart command often returns -EREMOTEIO a= nd the Si2168 does not restart. Note that this patch fixes the same issue as https://patchwork.linuxtv.org/= patch/44304/, but I believe my udelay() fix addresses the actual problem. Signed-off-by: Ron Economos Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/dvb-frontends/si2168.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-front= ends/si2168.c index 172fc367ccaa..24840a2e5a75 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -14,6 +14,8 @@ * GNU General Public License for more details. */ =20 +#include + #include "si2168_priv.h" =20 static const struct dvb_frontend_ops si2168_ops; @@ -435,6 +437,7 @@ static int si2168_init(struct dvb_frontend *fe) if (ret) goto err; =20 + udelay(100); memcpy(cmd.args, "\x85", 1); cmd.wlen =3D 1; cmd.rlen =3D 1; --=20 2.14.1