Skip to content

Commit efd319b

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 b6e59e7 commit efd319b

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
@@ -949,7 +949,7 @@ static struct iommu_device *apple_dart_probe_device(struct device *dev)
949949
struct apple_dart_stream_map *stream_map;
950950
int i;
951951

952-
if (!cfg)
952+
if (!dev_iommu_fwspec_get(dev) || !cfg)
953953
return ERR_PTR(-ENODEV);
954954

955955
for_each_stream_map(i, cfg, stream_map)

0 commit comments

Comments
 (0)