Commit d098215a authored by Bjorn Helgaas's avatar Bjorn Helgaas

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()
parents 99329ded f24c9bfc
...@@ -925,6 +925,9 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features) ...@@ -925,6 +925,9 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
dev_set_msi_domain(&vmd->bus->dev, dev_set_msi_domain(&vmd->bus->dev,
dev_get_msi_domain(&vmd->dev->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(); vmd_acpi_begin();
pci_scan_child_bus(vmd->bus); pci_scan_child_bus(vmd->bus);
...@@ -964,9 +967,6 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features) ...@@ -964,9 +967,6 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
pci_bus_add_devices(vmd->bus); pci_bus_add_devices(vmd->bus);
vmd_acpi_end(); 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; return 0;
} }
...@@ -1042,8 +1042,8 @@ static void vmd_remove(struct pci_dev *dev) ...@@ -1042,8 +1042,8 @@ static void vmd_remove(struct pci_dev *dev)
{ {
struct vmd_dev *vmd = pci_get_drvdata(dev); struct vmd_dev *vmd = pci_get_drvdata(dev);
sysfs_remove_link(&vmd->dev->dev.kobj, "domain");
pci_stop_root_bus(vmd->bus); pci_stop_root_bus(vmd->bus);
sysfs_remove_link(&vmd->dev->dev.kobj, "domain");
pci_remove_root_bus(vmd->bus); pci_remove_root_bus(vmd->bus);
vmd_cleanup_srcu(vmd); vmd_cleanup_srcu(vmd);
vmd_detach_resources(vmd); vmd_detach_resources(vmd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment