Skip to content

Commit

Permalink
Merge branch 'pci/controller/vmd'
Browse files Browse the repository at this point in the history
- 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()
  • Loading branch information
Bjorn Helgaas committed Jul 19, 2024
2 parents 99329de + f24c9bf commit d098215
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/pci/controller/vmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d098215

Please sign in to comment.