Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1116185yba; Fri, 3 May 2019 16:36:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLNjBoGNwmw8ElKmE+XJ0SZQohachVgelKHcqOEOr8yyHo3e6psPkZbJXMRmfHjVpJjkw4 X-Received: by 2002:a17:902:b217:: with SMTP id t23mr14831227plr.49.1556926599400; Fri, 03 May 2019 16:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556926599; cv=none; d=google.com; s=arc-20160816; b=vQAOYoMGThnsCNZcJOOo4G8FfU0/gI8LuXsgU/xOq1TFMFynctJo2WcVWP6eprAENC a56Usnu7zH1+aK1ngwnb4Gi7AJL7FZjYfavERBXRCTefubyNtUKM8e6vekRQsRWp/IxW 0lO5tp+omHPkXqAOPSXtJJe4mnsHEfiC21ve4ad2/tewFBXcOc0EMzVX0OM0KUkeuwnD anCk0yJW2KfpPJPUW9v5YaTnmDSeSu5miWleFZ1jb1pWtOZwfXDl7/VWoWiflIv12uVx sv7DZT/o/nnnzFzKRcy2+Ik9Ig9K+RypsZ95UvO6wezWkxZx7DBsu6CPZHrk+auO/5c0 uKFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MLniKeyCZOpahcUdSYJAe+ot7SuFR+G7B9LsqPznig0=; b=KWWFjSerOmotL7QCYNI8Oi8PwpfgTukTmQlSditusQAJcgUGbZv5GeAJd+AHfz5GaF PYR4OowF3RNroxjTuZ8FN/3vwlnHOmAOYprnNgXBv75e8jobRMOcmIMw2rvXm1B7Tl/j vMQFFBIsmVpYAwNAbk9ol2Jufz7ATWvAA1VQL07JzjFSrzfPmw2KcUPC4cY8/rcuHyR3 SrnvzwPOXjSPRzIYVLgVzHGbaU5CVRfbVgr0OIWGISW842Lf8wT0W04jvae4iAB9JmgK 3tXchY/sv8DplN0UWCSIG2JOxO8f5haI/HxWpixx6kfd8ejRx8+2yNIf9IpvF1B4tOBT A8Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HDskn1YS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si4671801pgn.93.2019.05.03.16.36.22; Fri, 03 May 2019 16:36:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HDskn1YS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726573AbfECXfR (ORCPT + 99 others); Fri, 3 May 2019 19:35:17 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:41230 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726220AbfECXfQ (ORCPT ); Fri, 3 May 2019 19:35:16 -0400 Received: by mail-oi1-f194.google.com with SMTP id v23so5696830oif.8 for ; Fri, 03 May 2019 16:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MLniKeyCZOpahcUdSYJAe+ot7SuFR+G7B9LsqPznig0=; b=HDskn1YS7k1QYZ+dsJLnQNeCPcK16/2pTj9ez8EsQ+gInQ3GZ0BR0iMYwxt27t5Q08 hqpBaeBjwOKtVQgCsUJvamW67feFI3qlTGT1KcmHb1GNFq6dCzpwgWTQP/JzQUPCoh2n gh9O0YLeaKKrsmhKadRh0K76x6bY8P9sjfUVyINU6ITXamAF6EGiGsKDgBzi64vXN4ct bI3LFVghfyoCDK7Dz4t2VyfzUyc9GObLwk+M40fnSIHaNJsKpyVb0A/uTNBX6Qn6G0yU J5rd391xjjIx53CQ+uUMu0rkwlGPR4eJbG8SVKyh/iDNDWmPx94d8aD8Aa44bL92YFsJ CikQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MLniKeyCZOpahcUdSYJAe+ot7SuFR+G7B9LsqPznig0=; b=IGNZeKHNaXf6jhlLZSscPKMGrDfRV50u4QFAE5VrG9Xf9g5eLhVXVTLAxMU1Qx5WaL wuF7qfjwmHi4Ie46A75F33w9zdFIn6LfzlZxgue1Tb3B1JgCWC/BylLBskXntS5p0Cr/ fap9H5sZ54tLSBeqCAJJkgpMf//DyV09EIV/pNnBNnj5ASG11CQk17Akud/4MGY3lFMs K3IfTnabv24LeCLpT9S9iu5Gmx/W16fbrq0jfFHRfmMIkAdCno1TNFV6zwrA2OHGIlMM 6SHcojs4q3k9BX2zYSIiPAehzQjv7D4LM8zRCyi5nbdSRFA17Pm5Iqxz6M00VHXhKTHb kcZg== X-Gm-Message-State: APjAAAVViCsV64EEYVScDbOt0tOcjWRqWgKh4fGbQ7vO5STMtLShw8cE ojyLgzVotUfc5HHiPp/TbV6Uh7s86bl2CkYL2Eh7jg== X-Received: by 2002:aca:4f10:: with SMTP id d16mr875911oib.17.1556926515368; Fri, 03 May 2019 16:35:15 -0700 (PDT) MIME-Version: 1.0 References: <20190430090021.GF26516@lahna.fi.intel.com> <20190502114839.GC24696@kroah.com> In-Reply-To: <20190502114839.GC24696@kroah.com> From: Furquan Shaikh Date: Fri, 3 May 2019 16:35:02 -0700 Message-ID: Subject: Re: [REGRESSION 5.0.8] Dell thunderbolt dock broken (xhci_hcd and thunderbolt) To: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" , Mika Westerberg , "Schmauss, Erik" , mh@mike.franken.de, Lukas Wunner , Takashi Iwai , Bjorn Helgaas , ckellner@redhat.com, Jiri Slaby , Linux Kernel Mailing List , "Rafael J. Wysocki" , ACPI Devel Maling List , Robert Moore Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 2, 2019 at 4:48 AM Greg Kroah-Hartman wrote: > > On Tue, Apr 30, 2019 at 11:37:48AM +0200, Rafael J. Wysocki wrote: > > On Tue, Apr 30, 2019 at 11:00 AM Mika Westerberg > > wrote: > > > > > > +Rafael, Furquan and linux-acpi > > > > > > (The original thread is here https://lore.kernel.org/lkml/s5hy33siofw.wl-tiwai@suse.de/T/#u) > > > > > > On Tue, Apr 30, 2019 at 10:39:00AM +0200, Michael Hirmke wrote: > > > > Hi Takashi, > > > > > > > > [...] > > > > >>> I also have XPS 9370 but not that particular dock. I will check tomorrow > > > > >>> if I can reproduce it as well. > > > > >> > > > > >> There aren't too many changes between 5.0.7 and 5.0.8 that touch > > > > >> PCI/ACPI. This is just a shot in the dark but could you try to revert: > > > > >> > > > > >> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gi > > > > >> t/commit/?h=linux-5.0.y&id=da6a87fb0ad43ae811519d2e0aa325c7f792b13a > > > > >> > > > > >> and see if it makes any difference? > > > > > > > > >OK, I'm building a test kernel package with the revert in OBS > > > > >home:tiwai:bsc1133486 repo. A new kernel will be > > > > >kernel-default-5.0.10-*g8edeab8: > > > > > http://download.opensuse.org/repositories/home:/tiwai:/bsc1133486/standard/ > > > > > > > > >Michael, once when the new kernel is ready, please give it a try. > > > > > > > > as far as I can see, state is back to normal with this kernel. > > > > No more error messages or crashing modules and all devices seem to work > > > > as expected. > > > > Only thing is, that the external devices connected to the Thunderbolt > > > > dock are coming up a little bit slower than with 5.0.7 - but this is > > > > nothing, I'd worry about. > > > > > > Thanks for testing. > > > > > > Rafael, it seems that commit c8b1917c8987 ("ACPICA: Clear status of GPEs > > > before enabling them") causes problem with Thunderbolt controllers if > > > you boot with device (dock) connected. > > > > > > I think the reason is the same that got fixed in v4.14 with commit > > > ecc1165b8b74 ("ACPICA: Dispatch active GPEs at init time") which the > > > above commit essentially undoes if I understand it correctly. > > > > OK, I'll queue up a revert of that one then, thanks! > > > > Erik, I think that commit c8b1917c8987 has been picked up by the > > upstream ACPICA already. If I'm not mistaken, it needs to be reverted > > from there as well. > > I've queued the revert up in the stable trees as it has hit Linus's tree > now, and will push out a new round of stable kernels soon. > > thanks, > > greg k-h Thanks for reporting the issue and apologize for the breakage. When I pushed the patch, my understanding was that the device drivers do not depend on stale GPE events to take any action. I am curious to understand the behavior for the thunderbolt device since I do not have one to test with. The failure seems to be a result of either having a edge-triggered interrupt or a pulse interrupt which indicates some kind of ready condition to the kernel driver. All the runtime GPEs seem to be initialized as part of acpi_init before ACPI bus is scanned. So, is this some special kind of requirement for thunderbolt that requires GPE enabled before the device can actually be probed. And so the GPEs going active before being enabled are then used as a way to call into ACPI Method to enable something which is essential for probing of device? The other question I have is given that handling of GPE events that were active before being enabled is required at least for some set of devices (e.g. thunderbolt), what is a good way to solve the original problem that was being addressed by the patch being reverted i.e. stale events resulting in spurious wakes on wakeup GPEs. One way I can think of is clearing the status of GPEs when they are setup for wake(acpi_setup_gpe_for_wake). What do you think?