[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210524144814.rqgvbaawdxbdwio4@archlinux>
Date: Mon, 24 May 2021 20:18:14 +0530
From: Amey Narkhede <ameynarkhede03@...il.com>
To: Krzysztof Wilczyński <kw@...ux.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, alex.williamson@...hat.com,
raphael.norwitz@...anix.com, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND v2 2/7] PCI: Add pcie_reset_flr to follow calling
convention of other reset methods
On 21/05/20 05:05PM, Krzysztof Wilczyński wrote:
> Hi Amey,
>
> [...]
> > +int pcie_reset_flr(struct pci_dev *dev, int probe)
> > +{
> > + u32 cap;
> > +
> > + if (dev->dev_flags & PCI_DEV_FLAGS_NO_FLR_RESET)
> > + return -ENOTTY;
> > +
> > + pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, &cap);
> > + if (!(cap & PCI_EXP_DEVCAP_FLR))
> > + return -ENOTTY;
> > +
> > + if (probe)
> > + return 0;
> > +
> > + return pcie_flr(dev);
> > +}
>
> Similarly to my suggestion in the first patch in the series, perhaps
> using a boolean here would be an option.
>
> Having said that, the following existing functions aren't doing it, so
> for the sake of keeping things consistent it might not be the best
> option, as per:
>
> static int pci_af_flr(struct pci_dev *dev, int probe)
> int nvme_disable_and_flr(struct pci_dev *dev, int probe)
>
> Krzysztof
All the functions which implement different types of resets including
quirks have ...reset(struct pci_dev *dev, int probe) signature.
Should I modify all of them?
Thanks,
Amey
Powered by blists - more mailing lists