lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1401580281.7663.14.camel@x230>
Date:	Sat, 31 May 2014 23:51:22 +0000
From:	Matthew Garrett <matthew.garrett@...ula.com>
To:	"andreas.noever@...il.com" <andreas.noever@...il.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"greg@...ah.com" <greg@...ah.com>,
	"bhelgaas@...gle.com" <bhelgaas@...gle.com>
Subject: Re: [PATCH v4 00/15] Thunderbolt driver for Apple MacBooks

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@...ula.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ