* [PATCH] PCI: vmd: Reset VMD config register between soft reboots
@ 2023-02-24 20:28 Nirmal Patel
2023-03-15 21:51 ` Patel, Nirmal
2023-04-21 8:29 ` Lorenzo Pieralisi
0 siblings, 2 replies; 5+ messages in thread
From: Nirmal Patel @ 2023-02-24 20:28 UTC (permalink / raw)
To: linux-pci, Nirmal Patel, Jonathan Derrick
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.
Signed-off-by: Nirmal Patel <nirmal.patel@linux.intel.com>
Fixes: ee81ee84f873 ("PCI: vmd: Disable MSI-X remapping when possible")
---
drivers/pci/controller/vmd.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 769eedeb8802..50a187a29a1d 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -979,6 +979,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)
{
@@ -1056,6 +1063,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,
},
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: vmd: Reset VMD config register between soft reboots
2023-02-24 20:28 [PATCH] PCI: vmd: Reset VMD config register between soft reboots Nirmal Patel
@ 2023-03-15 21:51 ` Patel, Nirmal
2023-03-18 3:15 ` Jonathan Derrick
2023-04-21 8:29 ` Lorenzo Pieralisi
1 sibling, 1 reply; 5+ messages in thread
From: Patel, Nirmal @ 2023-03-15 21:51 UTC (permalink / raw)
To: linux-pci, Jonathan Derrick
On 2/24/2023 1:28 PM, Nirmal Patel wrote:
> 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.
>
> Signed-off-by: Nirmal Patel <nirmal.patel@linux.intel.com>
> Fixes: ee81ee84f873 ("PCI: vmd: Disable MSI-X remapping when possible")
> ---
> drivers/pci/controller/vmd.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> index 769eedeb8802..50a187a29a1d 100644
> --- a/drivers/pci/controller/vmd.c
> +++ b/drivers/pci/controller/vmd.c
> @@ -979,6 +979,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)
> {
> @@ -1056,6 +1063,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,
> },
Gentle ping.
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: vmd: Reset VMD config register between soft reboots
2023-03-15 21:51 ` Patel, Nirmal
@ 2023-03-18 3:15 ` Jonathan Derrick
2023-04-18 14:54 ` Patel, Nirmal
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Derrick @ 2023-03-18 3:15 UTC (permalink / raw)
To: Patel, Nirmal, linux-pci
On 3/15/23 3:51 PM, Patel, Nirmal wrote:
> On 2/24/2023 1:28 PM, Nirmal Patel wrote:
>> 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.
>>
>> Signed-off-by: Nirmal Patel <nirmal.patel@linux.intel.com>
>> Fixes: ee81ee84f873 ("PCI: vmd: Disable MSI-X remapping when possible")
>> ---
>> drivers/pci/controller/vmd.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
>> index 769eedeb8802..50a187a29a1d 100644
>> --- a/drivers/pci/controller/vmd.c
>> +++ b/drivers/pci/controller/vmd.c
>> @@ -979,6 +979,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)
>> {
>> @@ -1056,6 +1063,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,
>> },
>
> Gentle ping.
>
> Thanks
>
LGTM
Reviewed-by: Jon Derrick <jonathan.derrick@linux.dev>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: vmd: Reset VMD config register between soft reboots
2023-03-18 3:15 ` Jonathan Derrick
@ 2023-04-18 14:54 ` Patel, Nirmal
0 siblings, 0 replies; 5+ messages in thread
From: Patel, Nirmal @ 2023-04-18 14:54 UTC (permalink / raw)
To: Jonathan Derrick, linux-pci
On 3/17/2023 8:15 PM, Jonathan Derrick wrote:
>
>
> On 3/15/23 3:51 PM, Patel, Nirmal wrote:
>> On 2/24/2023 1:28 PM, Nirmal Patel wrote:
>>> 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.
>>>
>>> Signed-off-by: Nirmal Patel <nirmal.patel@linux.intel.com>
>>> Fixes: ee81ee84f873 ("PCI: vmd: Disable MSI-X remapping when possible")
>>> ---
>>> drivers/pci/controller/vmd.c | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
>>> index 769eedeb8802..50a187a29a1d 100644
>>> --- a/drivers/pci/controller/vmd.c
>>> +++ b/drivers/pci/controller/vmd.c
>>> @@ -979,6 +979,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)
>>> {
>>> @@ -1056,6 +1063,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,
>>> },
>>
>> Gentle ping.
>>
>> Thanks
>>
>
> LGTM
> Reviewed-by: Jon Derrick <jonathan.derrick@linux.dev>
Gentle ping.
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: vmd: Reset VMD config register between soft reboots
2023-02-24 20:28 [PATCH] PCI: vmd: Reset VMD config register between soft reboots Nirmal Patel
2023-03-15 21:51 ` Patel, Nirmal
@ 2023-04-21 8:29 ` Lorenzo Pieralisi
1 sibling, 0 replies; 5+ messages in thread
From: Lorenzo Pieralisi @ 2023-04-21 8:29 UTC (permalink / raw)
To: linux-pci, Jonathan Derrick, Nirmal Patel; +Cc: Lorenzo Pieralisi
On Fri, 24 Feb 2023 13:28:11 -0700, Nirmal Patel wrote:
> 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.
>
> [...]
Applied to controller/vmd, thanks!
[1/1] PCI: vmd: Reset VMD config register between soft reboots
https://git.kernel.org/pci/pci/c/e06720c1d9e1
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-04-21 8:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-24 20:28 [PATCH] PCI: vmd: Reset VMD config register between soft reboots Nirmal Patel
2023-03-15 21:51 ` Patel, Nirmal
2023-03-18 3:15 ` Jonathan Derrick
2023-04-18 14:54 ` Patel, Nirmal
2023-04-21 8:29 ` Lorenzo Pieralisi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.