Commit b5abb12c authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branch 'pci/controller/vmd'

- Reset VMD config register between soft reboots (Nirmal Patel)

- Capture pci_reset_bus() return value instead of printing junk when it
  fails (Xinghui Li)

* pci/controller/vmd:
  PCI: vmd: Fix uninitialized variable usage in vmd_enable_domain()
  PCI: vmd: Reset VMD config register between soft reboots
parents 9f5eb1bf 0c0206dc
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -927,7 +927,8 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
		if (!list_empty(&child->devices)) {
			dev = list_first_entry(&child->devices,
					       struct pci_dev, bus_list);
			if (pci_reset_bus(dev))
			ret = pci_reset_bus(dev);
			if (ret)
				pci_warn(dev, "can't reset device: %d\n", ret);

			break;
@@ -1036,6 +1037,13 @@ static void vmd_remove(struct pci_dev *dev)
	ida_simple_remove(&vmd_instance_ida, vmd->instance);
}

static void vmd_shutdown(struct pci_dev *dev)
{
        struct vmd_dev *vmd = pci_get_drvdata(dev);

        vmd_remove_irq_domain(vmd);
}

#ifdef CONFIG_PM_SLEEP
static int vmd_suspend(struct device *dev)
{
@@ -1101,6 +1109,7 @@ static struct pci_driver vmd_drv = {
	.id_table	= vmd_ids,
	.probe		= vmd_probe,
	.remove		= vmd_remove,
	.shutdown	= vmd_shutdown,
	.driver		= {
		.pm	= &vmd_dev_pm_ops,
	},