lkml.org 
[lkml]   [2023]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/4] iommu: dart: Add flag to override bypass support
Date
The USB4 PCIe DARTs claim to support bypass but we never want to allow
that on externally facing ports.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
---
drivers/iommu/apple-dart.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
index 42666617803d..7d8b2b90cdb6 100644
--- a/drivers/iommu/apple-dart.c
+++ b/drivers/iommu/apple-dart.c
@@ -182,6 +182,8 @@ struct apple_dart_hw {
u64 ttbr_addr_field_shift;
u64 ttbr_shift;
int ttbr_count;
+
+ bool disable_bypass;
};

/*
@@ -1075,6 +1077,9 @@ static int apple_dart_probe(struct platform_device *pdev)
dart->pgsize = 1 << FIELD_GET(DART_PARAMS1_PAGE_SHIFT, dart_params[0]);
dart->supports_bypass = dart_params[1] & DART_PARAMS2_BYPASS_SUPPORT;

+ if (dart->hw->disable_bypass)
+ dart->supports_bypass = 0;
+
switch (dart->hw->type) {
case DART_T8020:
case DART_T6000:
--
2.25.1
\
 
 \ /
  Last update: 2023-03-27 00:00    [W:0.253 / U:1.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site