summary refs log tree commit diff
path: root/drivers/thunderbolt
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2020-08-21 09:11:50 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-09-03 12:21:08 +0300
commit8c3b15a60065369a3895d417d7fabb055209dfd4 (patch)
tree1b4d2fd2f6295caddc621ac6547fd1fb88b159e7 /drivers/thunderbolt
parent35ee69e94dce3730b5449854698c9407e607faa1 (diff)
downloadlinux-8c3b15a60065369a3895d417d7fabb055209dfd4.tar.gz
thunderbolt: Introduce tb_switch_is_ice_lake()
This is needed to differentiate Ice Lake from other controllers.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r--drivers/thunderbolt/tb.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index 664a861e8e9f..1d5ee4c0de1c 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -758,6 +758,18 @@ static inline bool tb_switch_is_titan_ridge(const struct tb_switch *sw)
 	return false;
 }
 
+static inline bool tb_switch_is_ice_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_ICL_NHI0:
+		case PCI_DEVICE_ID_INTEL_ICL_NHI1:
+			return true;
+		}
+	}
+	return false;
+}
+
 /**
  * tb_switch_is_usb4() - Is the switch USB4 compliant
  * @sw: Switch to check