Skip to content

Commit d296775

Browse files
marcanjannau
authored andcommitted
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 <jgg@nvidia.com> Signed-off-by: Hector Martin <marcan@marcan.st> iommu: apple-dart:
1 parent 226be78 commit d296775

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
@@ -782,7 +782,7 @@ static struct iommu_device *apple_dart_probe_device(struct device *dev)
782782
struct apple_dart_stream_map *stream_map;
783783
int i;
784784

785-
if (!cfg)
785+
if (!dev_iommu_fwspec_get(dev) || !cfg)
786786
return ERR_PTR(-ENODEV);
787787

788788
for_each_stream_map(i, cfg, stream_map)

0 commit comments

Comments
 (0)