Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Jonathan Derrick <jonathan.derrick@linux.dev>
To: "Patel, Nirmal" <nirmal.patel@linux.intel.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: vmd: Reset VMD config register between soft reboots
Date: Fri, 17 Mar 2023 21:15:40 -0600	[thread overview]
Message-ID: <ef8c77ef-c29a-0a5e-0ba2-33fbd6039700@linux.dev> (raw)
In-Reply-To: <8b5e6130-13c2-8142-6e70-075ba735fe60@linux.intel.com>



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>

  reply	other threads:[~2023-03-18  3:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2023-04-18 14:54     ` Patel, Nirmal
2023-04-21  8:29 ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef8c77ef-c29a-0a5e-0ba2-33fbd6039700@linux.dev \
    --to=jonathan.derrick@linux.dev \
    --cc=linux-pci@vger.kernel.org \
    --cc=nirmal.patel@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox