aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBjorn Helgaas2023-06-26 12:59:59 -0500
committerBjorn Helgaas2023-06-26 12:59:59 -0500
commitb5abb12cdd297339b30e95bc3e5e8e26723cf923 (patch)
tree564b2a2846ad410324f3f8fa1f2931d61c1a5035 /drivers
parent9f5eb1bf55121a5729c7ca27b4276b51d4ae3048 (diff)
parent0c0206dc4f5ba2d18b15e24d2047487d6f73916b (diff)
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/controller/vmd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 990630ec57c6..e718a816d481 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -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,
},