public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: 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>,
	Yinghai Lu <yinghai@kernel.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Amos Kong <kongjianjun@gmail.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] PCI Hotplug: workaround for Thunderbolt on Intel DZ77RE-75K motherboard
Date: Thu, 13 Dec 2012 10:48:20 -0800	[thread overview]
Message-ID: <20121213184820.GC12105@kroah.com> (raw)
In-Reply-To: <1355412708-20046-4-git-send-email-kirill.shutemov@linux.intel.com>

On Thu, Dec 13, 2012 at 05:31:48PM +0200, Kirill A. Shutemov wrote:
> From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
> 
> BIOS on Intel DZ77RE-75K motherboard notifies OS about Thunderbolt
> hotplug before devices behind Thunderbolt are ready to be enumerated.
> 
> Let's delay enumeration by 2 seconds.
> 
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> ---
>  drivers/pci/hotplug/acpiphp_glue.c |   16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
> index 1a2b3ca..165987a 100644
> --- a/drivers/pci/hotplug/acpiphp_glue.c
> +++ b/drivers/pci/hotplug/acpiphp_glue.c
> @@ -49,6 +49,7 @@
>  #include <linux/mutex.h>
>  #include <linux/slab.h>
>  #include <linux/acpi.h>
> +#include <linux/dmi.h>
>  
>  #include "../pci.h"
>  #include "acpiphp.h"
> @@ -1327,6 +1328,19 @@ out:
>  static void handle_hotplug_event_bridge(acpi_handle handle, u32 type,
>  					void *context)
>  {
> +	unsigned long delay = 0;
> +	const char *board_name;
> +
> +	board_name = dmi_get_system_info(DMI_BOARD_NAME);
> +	/*
> +	 * BIOS on Intel DZ77RE-75K motherboard notifies OS about Thunderbolt
> +	 * hotplug before devices behind Thunderbolt are ready to be
> +	 * enumerated.
> +	 * Let's delay enumeration by 2 seconds.
> +	 */
> +	if (board_name && !strcmp(board_name, "DZ77RE-75K"))
> +		delay = 2 * HZ;

Again, no objection to this patch as-is, but should we make it a bit
more "general" and provide a quirk table to make this type of fix easier
for other motherboards?  Shouldn't we also match on a manufacturer field
as well as the board_name?  The kernel provides a very easy to match on
any arbritary set of DMI fields for this kind of problem that we could
use here.

I can make that change if needed.

What are the odds that other boards are going to need a longer delay
time?  Actually, is there a spec saying how long we need to wait?  The
ACPI PCI Hotplug had a value somewhere that the hardware was supposed to
follow, but I don't have access to that ACPI spec anymore to verify
this...

thanks,

greg k-h

  reply	other threads:[~2012-12-13 18:48 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 [this message]
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
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=20121213184820.GC12105@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bhelgaas@google.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=john.ronciak@intel.com \
    --cc=kirill.shutemov@linux.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=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