Skip to content

Commit 58524fb

Browse files
marcanjannau
authored andcommitted
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 f1fbab4 commit 58524fb

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
@@ -1186,7 +1186,9 @@ static void apple_dart_remove(struct platform_device *pdev)
11861186
{
11871187
struct apple_dart *dart = platform_get_drvdata(pdev);
11881188

1189-
apple_dart_hw_reset(dart);
1189+
if (!dart->locked)
1190+
apple_dart_hw_reset(dart);
1191+
11901192
free_irq(dart->irq, dart);
11911193

11921194
iommu_device_unregister(&dart->iommu);
@@ -1319,6 +1321,10 @@ static __maybe_unused int apple_dart_resume(struct device *dev)
13191321
unsigned int sid, idx;
13201322
int ret;
13211323

1324+
/* Locked DARTs can't be restored, and they should not need it */
1325+
if (dart->locked)
1326+
return 0;
1327+
13221328
ret = apple_dart_hw_reset(dart);
13231329
if (ret) {
13241330
dev_err(dev, "Failed to reset DART on resume\n");

0 commit comments

Comments
 (0)