Skip to content

Commit ddb7bbc

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 32e1951 commit ddb7bbc

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
@@ -914,7 +914,7 @@ static struct iommu_device *apple_dart_probe_device(struct device *dev)
914914
struct apple_dart_stream_map *stream_map;
915915
int i;
916916

917-
if (!cfg)
917+
if (!dev_iommu_fwspec_get(dev) || !cfg)
918918
return ERR_PTR(-ENODEV);
919919

920920
for_each_stream_map(i, cfg, stream_map)

0 commit comments

Comments
 (0)