From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752192AbbLDNYh (ORCPT ); Fri, 4 Dec 2015 08:24:37 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:35649 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999AbbLDNYf (ORCPT ); Fri, 4 Dec 2015 08:24:35 -0500 Subject: Re: [PATCH] usb: xhci-mtk: fix AHB bus hang up caused by roothubs polling To: Chunfeng Yun , Mathias Nyman References: <1449196807-31785-1-git-send-email-chunfeng.yun@mediatek.com> Cc: Matthias Brugger , Felipe Balbi , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-mediatek@lists.infradead.org, Daniel Kurtz , Greg Kroah-Hartman From: Sergei Shtylyov Message-ID: <56619410.4000705@cogentembedded.com> Date: Fri, 4 Dec 2015 16:24:32 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1449196807-31785-1-git-send-email-chunfeng.yun@mediatek.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. Sorry for the grammar nitpicking but since it's in the comments, I felt the necessity to comment. On 12/4/2015 5:40 AM, Chunfeng Yun wrote: > when ip fail to enter sleep mode, register access protection will Fails. > be disabed, at the same time if all clocks are disabled, access ^^^^^^^ disabled > register will hang up AHB bus. > the common case causes ip sleep fail is that after all ports enter Failure. > U3 but before ip enters sleep mode, a port receives a resume > signal('K'). this will happens when such as clicks mouse to try to > do remote wakeup to stop system enter suspend. Wake up. > so stop polling roothubs to avoid access xHCI register on bus Root hubs. Accessing. > suspend, and restart it when bus resume. Resumes. Or "is resumed", maybe? > Signed-off-by: Chunfeng Yun > --- > drivers/usb/host/xhci-mtk.c | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c > index c9ab6a4..38635fb 100644 > --- a/drivers/usb/host/xhci-mtk.c > +++ b/drivers/usb/host/xhci-mtk.c > @@ -696,9 +696,24 @@ static int xhci_mtk_remove(struct platform_device *dev) > } > > #ifdef CONFIG_PM_SLEEP > +/* > + * if ip sleep fail, and all clocks are disabled, access register will hang Fails. > + * AHB bus, so stop poll roothubs to avoid regs access on bus suspend. Polling. > + * and no need to check whether ip sleep fail or not; this will cause SPM to Failed. > + * wakeup system immediately after system suspend complete if ip sleep Wake up. > + * fail, it is what we wanted. Fails. > + */ [...] MBR, Sergei