Skip to content

Commit 998fd7c

Browse files
committed
iommu: apple-dart: Check for fwspec in the device probe path
We need to check for a fwspec in the probe path, to ensure that the driver does not probe as a bus iommu driver. This, along with related fixes to the IOMMU core code, fixes races and issues when multiple IOMMUs assigned to the same device probe at different times. Suggested-by: Jason Gunthorpe <[email protected]> Signed-off-by: Hector Martin <[email protected]> iommu: apple-dart:
1 parent 91446e3 commit 998fd7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iommu/apple-dart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ static struct iommu_device *apple_dart_probe_device(struct device *dev)
907907
struct apple_dart_stream_map *stream_map;
908908
int i;
909909

910-
if (!cfg)
910+
if (!dev_iommu_fwspec_get(dev) || !cfg)
911911
return ERR_PTR(-ENODEV);
912912

913913
for_each_stream_map(i, cfg, stream_map)

0 commit comments

Comments
 (0)