]> git.hungrycats.org Git - linux/commit
PCI: vmd: Reset VMD config register between soft reboots
authorNirmal Patel <nirmal.patel@linux.intel.com>
Fri, 24 Feb 2023 20:28:11 +0000 (13:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jul 2023 17:39:45 +0000 (19:39 +0200)
commitc6bfda50e00920d719fff9688533a369f40dc27f
tree75638d55df511a2ac096e8008eb1aadf22d0ee0b
parentefee5ca159a992975f7c841d436d5b209c4fa917
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@linux.intel.com
Fixes: ee81ee84f873 ("PCI: vmd: Disable MSI-X remapping when possible")
Signed-off-by: Nirmal Patel <nirmal.patel@linux.intel.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Jon Derrick <jonathan.derrick@linux.dev>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/vmd.c