Skip to content

Commit b5abb12

Browse files
committed
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
2 parents 9f5eb1b + 0c0206d commit b5abb12

File tree

1 file changed

+10
-1
lines changed
  • drivers/pci/controller

1 file changed

+10
-1
lines changed

drivers/pci/controller/vmd.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,8 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
927927
if (!list_empty(&child->devices)) {
928928
dev = list_first_entry(&child->devices,
929929
struct pci_dev, bus_list);
930-
if (pci_reset_bus(dev))
930+
ret = pci_reset_bus(dev);
931+
if (ret)
931932
pci_warn(dev, "can't reset device: %d\n", ret);
932933

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

1040+
static void vmd_shutdown(struct pci_dev *dev)
1041+
{
1042+
struct vmd_dev *vmd = pci_get_drvdata(dev);
1043+
1044+
vmd_remove_irq_domain(vmd);
1045+
}
1046+
10391047
#ifdef CONFIG_PM_SLEEP
10401048
static int vmd_suspend(struct device *dev)
10411049
{
@@ -1101,6 +1109,7 @@ static struct pci_driver vmd_drv = {
11011109
.id_table = vmd_ids,
11021110
.probe = vmd_probe,
11031111
.remove = vmd_remove,
1112+
.shutdown = vmd_shutdown,
11041113
.driver = {
11051114
.pm = &vmd_dev_pm_ops,
11061115
},

0 commit comments

Comments
 (0)