Blob Blame History Raw
From 0637e3df17be8c3b41c1dc9b8d066d9d35044be3 Mon Sep 17 00:00:00 2001
From: Gil Fine <gil.fine@intel.com>
Date: Sat, 25 Jul 2020 10:44:16 +0300
Subject: [PATCH] thunderbolt: Introduce tb_switch_is_tiger_lake()
Git-commit: 0637e3df17be8c3b41c1dc9b8d066d9d35044be3
Patch-mainline: v5.10-rc1
References: bsc#1184129

This is needed to differentiate Tiger Lake from other controllers.

Signed-off-by: Gil Fine <gil.fine@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/thunderbolt/tb.h |   12 ++++++++++++
 1 file changed, 12 insertions(+)

--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -740,6 +740,18 @@ static inline bool tb_switch_is_titan_ri
 	}
 }
 
+static inline bool tb_switch_is_tiger_lake(const struct tb_switch *sw)
+{
+	if (sw->config.vendor_id == PCI_VENDOR_ID_INTEL) {
+		switch (sw->config.device_id) {
+		case PCI_DEVICE_ID_INTEL_TGL_NHI0:
+		case PCI_DEVICE_ID_INTEL_TGL_NHI1:
+			return true;
+		}
+	}
+	return false;
+}
+
 /**
  * tb_switch_is_usb4() - Is the switch USB4 compliant
  * @sw: Switch to check