diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2024-07-19 10:10:32 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2024-07-19 10:10:32 -0500 |
commit | d098215aec2c1a0ef785542c1b1bcf65d617dd80 (patch) | |
tree | 02e90f1bbef0d507a7bfd9db8535a82d9428a3b8 /drivers/pci | |
parent | 99329ded09099b40f755893b466571395d09ce46 (diff) | |
parent | f24c9bfcd423e2b2bb0d198456412f614ec2030a (diff) |
Merge branch 'pci/controller/vmd'
- Create "domain" symlink for vmd before adding devices below the VMD
bridge so it's available when mdadm assembles RAID devices from them
(Jiwei Sun)
* pci/controller/vmd:
PCI: vmd: Create domain symlink before pci_bus_add_devices()
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/controller/vmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c index 87b7856f375a..4e7fe2e13cac 100644 --- a/drivers/pci/controller/vmd.c +++ b/drivers/pci/controller/vmd.c @@ -925,6 +925,9 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features) dev_set_msi_domain(&vmd->bus->dev, dev_get_msi_domain(&vmd->dev->dev)); + WARN(sysfs_create_link(&vmd->dev->dev.kobj, &vmd->bus->dev.kobj, + "domain"), "Can't create symlink to domain\n"); + vmd_acpi_begin(); pci_scan_child_bus(vmd->bus); @@ -964,9 +967,6 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features) pci_bus_add_devices(vmd->bus); vmd_acpi_end(); - - WARN(sysfs_create_link(&vmd->dev->dev.kobj, &vmd->bus->dev.kobj, - "domain"), "Can't create symlink to domain\n"); return 0; } @@ -1042,8 +1042,8 @@ static void vmd_remove(struct pci_dev *dev) { struct vmd_dev *vmd = pci_get_drvdata(dev); - sysfs_remove_link(&vmd->dev->dev.kobj, "domain"); pci_stop_root_bus(vmd->bus); + sysfs_remove_link(&vmd->dev->dev.kobj, "domain"); pci_remove_root_bus(vmd->bus); vmd_cleanup_srcu(vmd); vmd_detach_resources(vmd); |