linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Furquan Shaikh <furquan@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Schmauss, Erik" <erik.schmauss@intel.com>,
	mh@mike.franken.de, Lukas Wunner <lukas@wunner.de>,
	Takashi Iwai <tiwai@suse.de>, Bjorn Helgaas <bhelgaas@google.com>,
	ckellner@redhat.com, Jiri Slaby <jslaby@suse.cz>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Robert Moore <robert.moore@intel.com>
Subject: Re: [REGRESSION 5.0.8] Dell thunderbolt dock broken (xhci_hcd and thunderbolt)
Date: Mon, 6 May 2019 09:45:34 +0300	[thread overview]
Message-ID: <20190506064534.GG2895@lahna.fi.intel.com> (raw)
In-Reply-To: <CAEGmHFFGpUmK1VitkUxqXL29dBrKwbceT0pEOeR_7+_4+eLzvA@mail.gmail.com>

On Fri, May 03, 2019 at 04:35:02PM -0700, Furquan Shaikh wrote:
> 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?

IIRC the idea is that when you boot with a TBT device connected (this is
only for the BIOS assisted/ACPI enumeration mode) the Thunderbolt host
router (the device with PCIe switch + xHCI + NHI) is configured in two
phases. The basic configuration is done in the ASL code that then waits
for a synchronization event (signal) from the SMI hotplug handler that
allows it to continue. The GPE which can be either edge or level is then
used to call the SMI hotplug handler to initialize the host router and
its resources properly.

If this is not done the PCI stack finds the host router half-configured
causing the failure.

> 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?

Sounds good to me.

  reply	other threads:[~2019-05-06  6:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 19:47 [REGRESSION 5.0.8] Dell thunderbolt dock broken (xhci_hcd and thunderbolt) Takashi Iwai
2019-04-29 19:54 ` Mika Westerberg
2019-04-29 20:03   ` Michael Hirmke
2019-04-29 20:13     ` Mika Westerberg
2019-04-29 20:36       ` Mika Westerberg
2019-04-29 22:07         ` Takashi Iwai
2019-04-30  8:39           ` Michael Hirmke
2019-04-30  9:00             ` Mika Westerberg
2019-04-30  9:37               ` Rafael J. Wysocki
2019-05-02 11:48                 ` Greg Kroah-Hartman
2019-05-03 23:35                   ` Furquan Shaikh
2019-05-06  6:45                     ` Mika Westerberg [this message]
2019-05-09 11:52                       ` Furquan Shaikh
2019-04-29 20:09   ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190506064534.GG2895@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=ckellner@redhat.com \
    --cc=erik.schmauss@intel.com \
    --cc=furquan@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mh@mike.franken.de \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).