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: 9924731 X-Patchwork-Delegate: bhelgaas@google.com 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 11BA360375 for ; Mon, 28 Aug 2017 08:36:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6230286AD for ; Mon, 28 Aug 2017 08:36:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D487A286B4; Mon, 28 Aug 2017 08:36:27 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FD21286BA for ; Mon, 28 Aug 2017 08:36:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463AbdH1IgW (ORCPT ); Mon, 28 Aug 2017 04:36:22 -0400 Received: from mga02.intel.com ([134.134.136.20]:52521 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752238AbdH1IgS (ORCPT ); Mon, 28 Aug 2017 04:36:18 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2017 01:35:59 -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> Cc: Bjorn Helgaas , Alan Stern , Greg Kroah-Hartman 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> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.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; }