diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-01-24 22:16:36 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-02-09 21:49:30 +0000 |
| commit | 1f19fc2632c98cfe653a082b5fcb02d16053ed06 (patch) | |
| tree | 1e6e5f186729045631fca5aa1c643a858a42015b /sys/compat/linuxkpi/common | |
| parent | b615b4805a9ce83b9b86dd66d46a9f220f9f89c6 (diff) | |
Diffstat (limited to 'sys/compat/linuxkpi/common')
| -rw-r--r-- | sys/compat/linuxkpi/common/src/linux_pci.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 612a2cb5f46b..477cb321ea9e 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -385,14 +385,16 @@ lkpifill_pci_dev(device_t dev, struct pci_dev *pdev) pdev->dev.bsddev = dev; pdev->dev.parent = &linux_root_device; pdev->dev.release = lkpi_pci_dev_release; - INIT_LIST_HEAD(&pdev->dev.irqents); if (pci_msi_count(dev) > 0) pdev->msi_desc = malloc(pci_msi_count(dev) * sizeof(*pdev->msi_desc), M_DEVBUF, M_WAITOK | M_ZERO); + TAILQ_INIT(&pdev->mmio); + spin_lock_init(&pdev->pcie_cap_lock); spin_lock_init(&pdev->dev.devres_lock); INIT_LIST_HEAD(&pdev->dev.devres_head); + INIT_LIST_HEAD(&pdev->dev.irqents); return (0); } @@ -613,9 +615,6 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, if (error) goto out_dma_init; - TAILQ_INIT(&pdev->mmio); - spin_lock_init(&pdev->pcie_cap_lock); - spin_lock(&pci_lock); list_add(&pdev->links, &pci_devices); spin_unlock(&pci_lock); |
