From: Matthew Garrett <matthew.garrett@nebula.com>
To: "andreas.noever@gmail.com" <andreas.noever@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"greg@kroah.com" <greg@kroah.com>,
"bhelgaas@google.com" <bhelgaas@google.com>
Subject: Re: [PATCH v4 00/15] Thunderbolt driver for Apple MacBooks
Date: Sat, 31 May 2014 23:51:22 +0000 [thread overview]
Message-ID: <1401580281.7663.14.camel@x230> (raw)
In-Reply-To: <1401546480-2071-1-git-send-email-andreas.noever@gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2644 bytes --]
On Sat, 2014-05-31 at 16:27 +0200, Andreas Noever wrote:
> Hi
>
> This is version 4 of my Thunderbolt driver for Apple hardware (see [1] for v3).
>
> Changes since v3:
> - Fix typos and style problems caught by Bjorn.
> - Changed the #ifdef CONFIG_ACPI block to cover the whole pci quirk.
Hi Andreas,
This seems to be working well on my MBP. It appears to broadly work on
my Mac Pro, which has Thunderbolt 2 hardware - I added the PCI ID, and
loading the thunderbolt driver after the device is plugged in works, but
it won't recognise hotplug events. I don't appear to get any interrupts
from the Thunderbolt controller. Any idea what might be happening there?
As far as the quirks go - perhaps something like this would be
reasonable, rather than maintaining a list of machines?
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index c9d6b90..c3170d4 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2993,35 +2993,6 @@ DECLARE_PCI_FIXUP_HEADER(0x1814, 0x0601, /*
Ralink RT2800 802.11n PCI */
quirk_broken_intx_masking);
#ifdef CONFIG_ACPI
-/* Apple systems with a Cactus Ridge Thunderbolt controller. */
-static struct dmi_system_id apple_thunderbolt_whitelist[] = {
- {
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro9"),
- },
- },
- {
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro10"),
- },
- },
- {
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir5"),
- },
- },
- {
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir6"),
- },
- },
- { }
-};
-
/*
* Apple: Shutdown Cactus Ridge Thunderbolt controller.
*
@@ -3041,7 +3012,7 @@ static void
quirk_apple_poweroff_thunderbolt(struct pci_dev *dev)
{
acpi_handle bridge, SXIO, SXFP, SXLV;
- if (!dmi_check_system(apple_thunderbolt_whitelist))
+ if (!dmi_match(DMI_BOARD_VENDOR, "Apple Inc."))
return;
if (pci_pcie_type(dev) != PCI_EXP_TYPE_UPSTREAM)
return;
@@ -3084,7 +3055,7 @@ static void
quirk_apple_wait_for_thunderbolt(struct pci_dev *dev)
struct pci_dev *sibling = NULL;
struct pci_dev *nhi = NULL;
- if (!dmi_check_system(apple_thunderbolt_whitelist))
+ if (!dmi_match(DMI_BOARD_VENDOR, "Apple Inc."))
return;
if (pci_pcie_type(dev) != PCI_EXP_TYPE_DOWNSTREAM)
return;
--
Matthew Garrett <matthew.garrett@nebula.com>
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2014-05-31 23:51 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-31 14:27 [PATCH v4 00/15] Thunderbolt driver for Apple MacBooks Andreas Noever
2014-05-31 14:27 ` [PATCH v4 01/15] thunderbolt: Add initial cactus ridge NHI support Andreas Noever
2014-05-31 14:27 ` [PATCH v4 02/15] thunderbolt: Add control channel interface Andreas Noever
2014-05-31 14:27 ` [PATCH v4 03/15] thunderbolt: Setup control channel Andreas Noever
2014-05-31 14:27 ` [PATCH v4 04/15] thunderbolt: Add tb_regs.h Andreas Noever
2014-05-31 14:27 ` [PATCH v4 05/15] thunderbolt: Initialize root switch and ports Andreas Noever
2014-05-31 14:27 ` [PATCH v4 06/15] thunderbolt: Add thunderbolt capability handling Andreas Noever
2014-05-31 14:27 ` [PATCH v4 07/15] thunderbolt: Enable plug events Andreas Noever
2014-05-31 14:27 ` [PATCH v4 08/15] thunderbolt: Scan for downstream switches Andreas Noever
2014-05-31 14:27 ` [PATCH v4 09/15] thunderbolt: Handle hotplug events Andreas Noever
2014-05-31 14:27 ` [PATCH v4 10/15] thunderbolt: Add path setup code Andreas Noever
2014-05-31 14:27 ` [PATCH v4 11/15] thunderbolt: Add support for simple pci tunnels Andreas Noever
2014-05-31 14:27 ` [PATCH v4 12/15] PCI: Add pci_fixup_suspend_late quirk pass Andreas Noever
2014-05-31 14:27 ` [PATCH v4 13/15] PCI: Suspend/resume quirks for Apple thunderbolt Andreas Noever
2014-05-31 14:27 ` [PATCH v4 14/15] thunderbolt: Read switch uid from EEPROM Andreas Noever
2014-05-31 14:28 ` [PATCH v4 15/15] thunderbolt: Add suspend/hibernate support Andreas Noever
2014-05-31 17:51 ` [PATCH v4 00/15] Thunderbolt driver for Apple MacBooks Greg KH
2014-05-31 23:51 ` Matthew Garrett [this message]
2014-06-01 10:11 ` Andreas Noever
2014-06-01 16:07 ` Matthew Garrett
2014-06-01 20:45 ` Andreas Noever
2014-06-01 22:02 ` Matthew Garrett
2014-06-01 22:57 ` greg
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=1401580281.7663.14.camel@x230 \
--to=matthew.garrett@nebula.com \
--cc=andreas.noever@gmail.com \
--cc=bhelgaas@google.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.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