Skip to content

Commit 690fe63

Browse files
committed
iommu: apple-dart: Don't attempt to reset/restore locked DARTs
This can't work, and should not be needed in these cases. Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 7b5b83a commit 690fe63

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/iommu/apple-dart.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,9 @@ static void apple_dart_remove(struct platform_device *pdev)
11541154
{
11551155
struct apple_dart *dart = platform_get_drvdata(pdev);
11561156

1157-
apple_dart_hw_reset(dart);
1157+
if (!dart->locked)
1158+
apple_dart_hw_reset(dart);
1159+
11581160
free_irq(dart->irq, dart);
11591161

11601162
iommu_device_unregister(&dart->iommu);
@@ -1260,6 +1262,10 @@ static __maybe_unused int apple_dart_resume(struct device *dev)
12601262
unsigned int sid, idx;
12611263
int ret;
12621264

1265+
/* Locked DARTs can't be restored, and they should not need it */
1266+
if (dart->locked)
1267+
return 0;
1268+
12631269
ret = apple_dart_hw_reset(dart);
12641270
if (ret) {
12651271
dev_err(dev, "Failed to reset DART on resume\n");

0 commit comments

Comments
 (0)