Patch "PCI: vmd: Reset VMD config register between soft reboots" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    PCI: vmd: Reset VMD config register between soft reboots

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci-vmd-reset-vmd-config-register-between-soft-reboo.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 63361faa4c66c5593b7ef6a4004e83313d1f6a80
Author: Nirmal Patel <nirmal.patel@xxxxxxxxxxxxxxx>
Date:   Fri Feb 24 13:28:11 2023 -0700

    PCI: vmd: Reset VMD config register between soft reboots
    
    [ Upstream commit b61cf04c49c3dfa70a0d6725d3eb40bf9b35cf71 ]
    
    VMD driver can disable or enable MSI remapping by changing
    VMCONFIG_MSI_REMAP register. This register needs to be set to the
    default value during soft reboots. Drives failed to enumerate
    when Windows boots after performing a soft reboot from Linux.
    Windows doesn't support MSI remapping disable feature and stale
    register value hinders Windows VMD driver initialization process.
    Adding vmd_shutdown function to make sure to set the VMCONFIG
    register to the default value.
    
    Link: https://lore.kernel.org/r/20230224202811.644370-1-nirmal.patel@xxxxxxxxxxxxxxx
    Fixes: ee81ee84f873 ("PCI: vmd: Disable MSI-X remapping when possible")
    Signed-off-by: Nirmal Patel <nirmal.patel@xxxxxxxxxxxxxxx>
    Signed-off-by: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
    Reviewed-by: Jon Derrick <jonathan.derrick@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 8dce71142e10f..f49001ba96c75 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -881,6 +881,13 @@ static void vmd_remove(struct pci_dev *dev)
 	vmd_remove_irq_domain(vmd);
 }
 
+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)
 {
@@ -946,6 +953,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,
 	},



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux