From patchwork Tue Dec 22 09:34:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11986159 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1AD1C43381 for ; Tue, 22 Dec 2020 09:36:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C9132310D for ; Tue, 22 Dec 2020 09:36:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726082AbgLVJfu (ORCPT ); Tue, 22 Dec 2020 04:35:50 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:47521 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725897AbgLVJfp (ORCPT ); Tue, 22 Dec 2020 04:35:45 -0500 X-UUID: e0875460767e42219c5c57c658387b34-20201222 X-UUID: e0875460767e42219c5c57c658387b34-20201222 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 163910702; Tue, 22 Dec 2020 17:34:57 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 22 Dec 2020 17:34:53 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 22 Dec 2020 17:34:52 +0800 From: Chunfeng Yun To: Ikjoon Jang CC: Chunfeng Yun , Tianping Fang , Zhanyong Wang , , , Subject: [RFC PATCH v3 3/5] usb: xhci-mtk: fix random remote wakeup Date: Tue, 22 Dec 2020 17:34:40 +0800 Message-ID: <1608629682-8535-3-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1608629682-8535-1-git-send-email-chunfeng.yun@mediatek.com> References: <1608629682-8535-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: DB305DF1703578D7A07C42CC68D02DC8FE8162C6711BAE8B5815CD4297C816F72000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Wakeup_signal will toggle status according to ssusb_ip_sleep signal after debounc time, add a delay time to avoid spurious wakeup event. Signed-off-by: Chunfeng Yun --- v3: new patch --- drivers/usb/host/xhci-mtk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index 565ce4c16206..34bd3de090b1 100755 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -172,7 +172,10 @@ static int xhci_mtk_host_disable(struct xhci_hcd_mtk *mtk) if (ret) { dev_err(mtk->dev, "ip sleep failed!!!\n"); return ret; + } else { + usleep_range(200, 250); } + return 0; }