File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -2702,15 +2702,16 @@ static struct dmar_satc_unit *dmar_find_matched_satc_unit(struct pci_dev *dev)
2702
2702
return satcu ;
2703
2703
}
2704
2704
2705
- static int dmar_ats_supported (struct pci_dev * dev , struct intel_iommu * iommu )
2705
+ static bool dmar_ats_supported (struct pci_dev * dev , struct intel_iommu * iommu )
2706
2706
{
2707
- int i , ret = 1 ;
2708
- struct pci_bus * bus ;
2709
2707
struct pci_dev * bridge = NULL ;
2710
- struct device * tmp ;
2711
- struct acpi_dmar_atsr * atsr ;
2712
2708
struct dmar_atsr_unit * atsru ;
2713
2709
struct dmar_satc_unit * satcu ;
2710
+ struct acpi_dmar_atsr * atsr ;
2711
+ bool supported = true;
2712
+ struct pci_bus * bus ;
2713
+ struct device * tmp ;
2714
+ int i ;
2714
2715
2715
2716
dev = pci_physfn (dev );
2716
2717
satcu = dmar_find_matched_satc_unit (dev );
@@ -2728,11 +2729,11 @@ static int dmar_ats_supported(struct pci_dev *dev, struct intel_iommu *iommu)
2728
2729
bridge = bus -> self ;
2729
2730
/* If it's an integrated device, allow ATS */
2730
2731
if (!bridge )
2731
- return 1 ;
2732
+ return true ;
2732
2733
/* Connected via non-PCIe: no ATS */
2733
2734
if (!pci_is_pcie (bridge ) ||
2734
2735
pci_pcie_type (bridge ) == PCI_EXP_TYPE_PCI_BRIDGE )
2735
- return 0 ;
2736
+ return false ;
2736
2737
/* If we found the root port, look it up in the ATSR */
2737
2738
if (pci_pcie_type (bridge ) == PCI_EXP_TYPE_ROOT_PORT )
2738
2739
break ;
@@ -2751,11 +2752,11 @@ static int dmar_ats_supported(struct pci_dev *dev, struct intel_iommu *iommu)
2751
2752
if (atsru -> include_all )
2752
2753
goto out ;
2753
2754
}
2754
- ret = 0 ;
2755
+ supported = false ;
2755
2756
out :
2756
2757
rcu_read_unlock ();
2757
2758
2758
- return ret ;
2759
+ return supported ;
2759
2760
}
2760
2761
2761
2762
int dmar_iommu_notify_scope_dev (struct dmar_pci_notify_info * info )
You can’t perform that action at this time.
0 commit comments