From patchwork Mon Aug 28 08:39:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Nyman X-Patchwork-Id: 9924733 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 9FE3260375 for ; Mon, 28 Aug 2017 08:36:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C192286A8 for ; Mon, 28 Aug 2017 08:36:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E715286C1; Mon, 28 Aug 2017 08:36:34 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 183A4286B7 for ; Mon, 28 Aug 2017 08:36:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2YaUtSQczk5X9gyVbObOV13ohCgHJH7zj9RXgc320uo=; b=nLFFW9Bov2W5ZW2SPm9DO9sX6 IpxUalyv0khxtEmqfcRRoiRoRsGJYvfVm0uD9IG44sk5ULi636CMeb6R7nBnIX1nPzGp5zkZFZCNI ieMuXRpUWSVkYJs3fYagFNwlGB9TJV6W7KRLew4N6gA6WhyKvhENYEtcD2QN5MfFda7qyfyrfvTtr grVXYeNngcCNZsi7YP4HXSUetQLByKK2jhRgGTaj7APXzdHwtKWcNGcsgDqodaGUMvClRHGaurSgw qQM3LFk7QEYluFD83sCWy+px25vUm7na4aL0ChhtBSm3lBTWvPXA35Ct8x7qLn1B8byollYvKb/+W OjWkv9rDg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dmFX1-0001NQ-SZ; Mon, 28 Aug 2017 08:36:27 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dmFWv-0001Jm-Bi for linux-arm-kernel@lists.infradead.org; Mon, 28 Aug 2017 08:36:25 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2017 01:36:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,440,1498546800"; d="scan'208";a="128902652" Received: from mattu-haswell.fi.intel.com (HELO [10.237.72.164]) ([10.237.72.164]) by orsmga002.jf.intel.com with ESMTP; 28 Aug 2017 01:35:57 -0700 Subject: Re: Possible regression between 4.9 and 4.13 To: Mason , Mathias Nyman , Felipe Balbi , linux-pci , linux-usb , Linux ARM References: <4dee5523-2d76-e731-6e81-f3027e88827f@free.fr> <87a82qbyv5.fsf@linux.intel.com> <599D3410.9050504@intel.com> <251c41c0-a4fd-8aae-88e0-5d5928ce45cf@free.fr> <599D62EA.7050100@linux.intel.com> <8ac92197-907a-282b-2165-f50d1b09bd55@free.fr> <61d34811-f17c-6faf-252f-c4c81feb9e89@free.fr> From: Mathias Nyman Message-ID: <59A3D6BF.7010400@linux.intel.com> Date: Mon, 28 Aug 2017 11:39:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <61d34811-f17c-6faf-252f-c4c81feb9e89@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170828_013621_588829_F21B7369 X-CRM114-Status: GOOD ( 14.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alan Stern , Bjorn Helgaas , Greg Kroah-Hartman Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On 23.08.2017 17:30, Mason wrote: > On 23/08/2017 14:41, Mason wrote: > >> I compiled a minimal kernel, with lots of irrelevant drivers and >> frameworks left out, including power management. I still get the >> "xHCI host controller not responding, assume dead" issue. > > The problem seems to have a timing-related aspect. > > I added a bunch of logs (to a slow serial console) and the HC was > not killed. I was able to plug the Flash drive a second time. > (I am logging config space reads and writes.) Could you take a log with the following added debug, without your extra delays, It should show a bit more about the state of the controller when we read 0xffffffff Thanks -Mathias diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 4bc6f42..a124c3d 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -23,6 +23,7 @@ #include #include +#include #include "xhci.h" #include "xhci-trace.h" @@ -1280,7 +1281,11 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, wIndex--; temp = readl(port_array[wIndex]); if (temp == ~(u32)0) { - xhci_hc_died(xhci); + struct pci_dev *pdev = to_pci_dev(hcd->self.controller); + xhci_err(xhci, "ClearPortFeat port%d @%p=%x, hcd->state:0x%x hcd->flags:0x%x, pci_state 0x%x\n", + wIndex, port_array[wIndex], temp, hcd->state, hcd->flags, pdev->current_state); + + WARN_ON(1); retval = -ENODEV; break; }