diff --git a/sys/x86/iommu/amd_drv.c b/sys/x86/iommu/amd_drv.c index 2ab0213925e..72aae58334f 100644 --- a/sys/x86/iommu/amd_drv.c +++ b/sys/x86/iommu/amd_drv.c @@ -176,7 +176,6 @@ ivrs_lookup_ivhd_0x40(ACPI_IVRS_HARDWARE2 *h2, void *arg) return (false); ildp->sc->unit_dom = h2->PciSegmentGroup; - ildp->sc->iommu.unit = ivrs_info_to_unit_id(h2->Info); ildp->sc->efr = h2->EfrRegisterImage; return (true); } @@ -194,7 +193,6 @@ ivrs_lookup_ivhd_0x10(ACPI_IVRS_HARDWARE1 *h1, void *arg) return (false); ildp->sc->unit_dom = h1->PciSegmentGroup; - ildp->sc->iommu.unit = ivrs_info_to_unit_id(h1->Info); return (true); } @@ -456,6 +454,7 @@ amdiommu_attach(device_t dev) bool res; sc = device_get_softc(dev); + sc->iommu.unit = device_get_unit(dev); sc->iommu.dev = dev; error = pci_find_cap(dev, PCIY_SECDEV, &sc->seccap_reg);