From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Yinghai Lu <yinghai@kernel.org>,
Greg KH <gregkh@linuxfoundation.org>,
Miles J Penner <miles.j.penner@intel.com>,
John Ronciak <john.ronciak@intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Tushar N Dave <tushar.n.dave@intel.com>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
Bjorn Helgaas <bhelgaas@google.com>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Amos Kong <kongjianjun@gmail.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] PCI Hotplug: workaround for Thunderbolt on Intel DZ77RE-75K motherboard
Date: Fri, 14 Dec 2012 12:34:33 +0200 [thread overview]
Message-ID: <20121214103433.GA15240@otc-wbsnb-06> (raw)
In-Reply-To: <CA+55aFwxmhcgORCnDKwcp5EuzvC0iz02O4QR3H_stTXDbprYSA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1630 bytes --]
On Thu, Dec 13, 2012 at 12:30:04PM -0800, Linus Torvalds wrote:
> On Thu, Dec 13, 2012 at 12:25 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> >
> > Linus will not be happy with those kind of delay.
>
> Indeed. And the DMI check is bogus too, since the "there can be
> delays" is apparently part of the pcie hotplug spec.
>
> So do the sane thing. Retry a few times, with increasingly long delays
> (ie something like start with 10ms, then double the delay until you
> hit 1s, and then just give up: end result, ~2s total wait, but 10ms
> for any sane device that doesn't suck).
>
> No DMI checks, no hacks, not insane default delays.
I've realized that there's no strong criteria of hotplug success in ACPI
PCI Hotplug. We can't know when we should stop retrying.
In Thunderbolt case before any devices hotplugged you only see a root
port. Thunderbolt host controller is powered off and kernel can't see it.
On hotplug BIOS enables the host controller, initialize it and notify OS
about hotplug.
Normally kernel will enumerate 6 ports on Thunderbolt host controller, 2
ports on device Thunderbolt controller and target device itself. All this
for simple non-chained case. With device chaining the hierarchy is even
more complex.
On DZ77RE-75K motherboard without the workaround kernel will discover only
ports on host controller, but not device ports or device.
So kernel will find devices on broken implementation, not all of them.
Even worse: there's no way to distinguish between plug and unplug events
and kernel uses the same code path for both cases.
--
Kirill A. Shutemov
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-12-14 10:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-13 19:25 [PATCH 0/3] Thunderbolt workarounds Kirill A. Shutemov
2012-12-13 15:31 ` [PATCH 1/3] PCI Hotplug: workaround for Thunderbolt on Acer Aspire S5 Kirill A. Shutemov
2012-12-13 18:44 ` Greg KH
2012-12-13 19:35 ` Kirill A. Shutemov
2012-12-14 0:22 ` Bjorn Helgaas
2012-12-14 10:46 ` Kirill A. Shutemov
2012-12-13 15:31 ` [PATCH 2/3] PCI Hotplug: convert acpiphp_hp_work to use delayed work Kirill A. Shutemov
2012-12-13 15:31 ` [PATCH 3/3] PCI Hotplug: workaround for Thunderbolt on Intel DZ77RE-75K motherboard Kirill A. Shutemov
2012-12-13 18:48 ` Greg KH
2012-12-13 20:08 ` Kirill A. Shutemov
2012-12-13 20:25 ` Yinghai Lu
2012-12-13 20:30 ` Linus Torvalds
2012-12-13 20:49 ` Kirill A. Shutemov
2012-12-13 20:54 ` Linus Torvalds
2012-12-13 22:06 ` Rafael J. Wysocki
2012-12-14 10:34 ` Kirill A. Shutemov [this message]
2012-12-27 0:50 ` [PATCH 0/3] Thunderbolt workarounds Bjorn Helgaas
2012-12-27 9:33 ` Mika Westerberg
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=20121214103433.GA15240@otc-wbsnb-06 \
--to=kirill.shutemov@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=jbarnes@virtuousgeek.org \
--cc=john.ronciak@intel.com \
--cc=kirill@shutemov.name \
--cc=kongjianjun@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=miles.j.penner@intel.com \
--cc=rjw@sisk.pl \
--cc=torvalds@linux-foundation.org \
--cc=tushar.n.dave@intel.com \
--cc=yinghai@kernel.org \
/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).