@@ -4118,11 +4118,20 @@ static int intel_iommu_add_device(struct device
*dev)
bridge = pci_find_upstream_pcie_bridge(pdev);
if (bridge) {
- if (pci_is_pcie(bridge))
+ if (pci_is_pcie(bridge)) {
dma_pdev = pci_get_domain_bus_and_slot(
pci_domain_nr(pdev->bus),
bridge->subordinate->number, 0);
- else
+ if (!dma_pdev) {
+ printk("MTHODE: debugging\n");
+ printk("domain: %d, bus: %d, bridge->sub %d\n",
+ pci_domain_nr(pdev->bus), pdev->bus,
+ bridge->subordinate->number);
+ dma_pdev = pci_get_domain_bus_and_slot(
+ pci_domain_nr(pdev->bus),
+ bridge->subordinate->number - 1, 0);
+ }
+ } else
dma_pdev = pci_dev_get(bridge);
} else