[PATCH 2/2] nvme-pci: add AMD PCIe quirk for suspend/resume
Liang, Prike
Prike.Liang at amd.com
Thu Apr 15 07:14:23 BST 2021
[AMD Public Use]
> From: Keith Busch <kbusch at kernel.org>
> Sent: Thursday, April 15, 2021 11:59 AM
> To: Liang, Prike <Prike.Liang at amd.com>
> Cc: linux-nvme at lists.infradead.org; Chaitanya.Kulkarni at wdc.com;
> gregkh at linuxfoundation.org; hch at infradead.org; stable at vger.kernel.org; S-
> k, Shyam-sundar <Shyam-sundar.S-k at amd.com>; Deucher, Alexander
> <Alexander.Deucher at amd.com>
> Subject: Re: [PATCH 2/2] nvme-pci: add AMD PCIe quirk for suspend/resume
>
> On Thu, Apr 15, 2021 at 03:22:52AM +0000, Liang, Prike wrote:
> > > >
> > > > +rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
> > >
> > > Instead of assuming '0', shouldn't you use the domain of the NVMe
> > > PCI device?
> > Now we just add the NVMe shutdown quirk by checking the root complex
> ID instead of adding more and more variables endpoint NVMe device.
>
> I understand what you are doing. I am just suggesting this quirk use the RC of
> the device in question rather than assume the RC is in domain 0. I realize a
> platform will probably align to your assumption. This is just for correctness
> and should look like:
>
> rdev = pci_get_domain_bus_and_slot(pci_domain_nr(dev->bus), 0,
> PCI_DEVFN(0, 0));
Thanks, I confirm the device domain also enumerated as 0 by calculating the NVMe controller sys index and will update the patch.
More information about the Linux-nvme
mailing list