Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2018-09-10 Thread Sinan Kaya
On 9/10/2018 5:52 AM, Pasi Kärkkäinen wrote: Hi, On Sun, Sep 09, 2018 at 10:33:02PM -0400, Sinan Kaya wrote: On 9/9/2018 2:59 PM, Pasi Kärkkäinen wrote: I noticed pcie_has_flr() has been recently exported in upstream Linux:

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2018-09-10 Thread Pasi Kärkkäinen
Hi, On Sun, Sep 09, 2018 at 10:33:02PM -0400, Sinan Kaya wrote: > On 9/9/2018 2:59 PM, Pasi Kärkkäinen wrote: > >I noticed pcie_has_flr() has been recently exported in upstream Linux: >

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2018-09-09 Thread Sinan Kaya
On 9/9/2018 2:59 PM, Pasi Kärkkäinen wrote: I noticed pcie_has_flr() has been recently exported in upstream Linux: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d2917f7747805a1f4188672f308d82a8ba01700 Are there more changes / cleanups planned to these

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2018-09-09 Thread Pasi Kärkkäinen
On Mon, Dec 18, 2017 at 04:26:30AM -0800, Christoph Hellwig wrote: > On Fri, Dec 15, 2017 at 12:18:02PM -0600, Bjorn Helgaas wrote: > > I think Christoph volunteered to do some restructuring, but I don't > > know his timeframe. If you can, I would probably wait for that > > because there's so

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-18 Thread Govinda Tatti
On 12/18/2017 6:26 AM, Christoph Hellwig wrote: On Fri, Dec 15, 2017 at 12:18:02PM -0600, Bjorn Helgaas wrote: I think Christoph volunteered to do some restructuring, but I don't know his timeframe. If you can, I would probably wait for that because there's so much overlap here. I'll have

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-18 Thread Christoph Hellwig
On Fri, Dec 15, 2017 at 12:18:02PM -0600, Bjorn Helgaas wrote: > I think Christoph volunteered to do some restructuring, but I don't > know his timeframe. If you can, I would probably wait for that > because there's so much overlap here. I'll have some time over the holidays. If you need it

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-15 Thread Govinda Tatti
Thanks Bjorn for your response. Please see below for my comments. So, we should consider one of these options. - set PCI_DEV_FLAGS_NO_FLR_RESET if it is not supported. - pcie_flr() should return if it is not supported If we modify pcie_flr() to return error codes, then we need to modify all

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-15 Thread Bjorn Helgaas
[+cc Russell, Sinan, Herbert, Srikanth, Derek, Satanand, Felix, Raghu] On Fri, Dec 15, 2017 at 09:48:02AM -0600, Govinda Tatti wrote: > On 12/13/2017 3:24 PM, Bjorn Helgaas wrote: > >On Wed, Dec 13, 2017 at 02:46:57PM -0600, Govinda Tatti wrote: > >>-static bool pcie_has_flr(struct pci_dev

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-14 Thread Christoph Hellwig
On Wed, Dec 13, 2017 at 03:24:21PM -0600, Bjorn Helgaas wrote: > Prior to a60a2b73ba69, we had > > int pcie_flr(struct pci_dev *dev, int probe); > > like all the other reset methods. AFAICT, the addition of > pcie_has_flr() was to optimize the path slightly because when drivers > call

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-13 Thread Bjorn Helgaas
[+cc Christoph] On Wed, Dec 13, 2017 at 02:46:57PM -0600, Govinda Tatti wrote: > > -static bool pcie_has_flr(struct pci_dev *dev) > +bool pcie_has_flr(struct pci_dev *dev) > { > u32 cap; > @@ -3882,6 +3882,7 @@ static bool pcie_has_flr(struct pci_dev *dev) >

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-13 Thread Govinda Tatti
-static bool pcie_has_flr(struct pci_dev *dev) +bool pcie_has_flr(struct pci_dev *dev) { u32 cap; @@ -3882,6 +3882,7 @@ static bool pcie_has_flr(struct pci_dev *dev) pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, ); return cap & PCI_EXP_DEVCAP_FLR; }

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-12 Thread Christoph Hellwig
On Fri, Dec 08, 2017 at 02:24:24PM -0600, Bjorn Helgaas wrote: > I'd rather change pcie_flr() so you could *always* call it, and it > would return 0, -ENOTTY, or whatever, based on whether FLR is > supported. Is that feasible? > > I don't like the "Can I do this? Ok, do this" style of

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-08 Thread Bjorn Helgaas
On Thu, Dec 07, 2017 at 05:21:44PM -0500, Govinda Tatti wrote: > This patch exports pcie_has_flr() and it is being used by Xen pciback > driver to reset (flr/slot/bus) PCI devices based on 'reset' SysFS > attribute. > > Signed-off-by: Govinda Tatti > --- > v3: -New > >

[Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-07 Thread Govinda Tatti
This patch exports pcie_has_flr() and it is being used by Xen pciback driver to reset (flr/slot/bus) PCI devices based on 'reset' SysFS attribute. Signed-off-by: Govinda Tatti --- v3: -New drivers/pci/pci.c | 3 ++- include/linux/pci.h | 1 + 2 files changed, 3