From: Joel Granados<j.granados@xxxxxxxxxxx>
Enable the pci capabilities by calling iommu_enable_pci_caps before we
assign a cache tag. The cache_tag_assign_domain call in
dmar_domain_attach_device uses the device_domain_info->ats_enabled
element to decide on the cache_tag_type value. Therefore ats_enabled
needs to be evaluated before the call to the tag cache assignment.
Signed-off-by: Joel Granados<j.granados@xxxxxxxxxxx>
---
The "what" and "why" are included in the commit message.
Tried to place cache_tag_assign_domain before the early return in
"if(dev_is_real_dma_subdevice(dev))". This means that the call to
iommu_enable_pci_caps landed before the setup functions [1] which is not
an issue as they seem to be orthogonal (I would like to be proven wrong
here).
An alternative to this patch would be to use a different way of checking
if the device is ATS enabled in __cache_tag_assign_domain.
Comments greatly appreciated