Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-06-22 Thread Sinan Kaya
On 6/22/2018 10:01 AM, Bjorn Helgaas wrote: >> Since Oza's DPC/AER patch to refactor fatal error handling, both >> hotplug driver and AER/DPC driver will try removing devices and >> perform enumeration on link events/AER events. >> >> Perfect environment for race condition without a change. >

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-06-22 Thread Sinan Kaya
On 6/22/2018 10:01 AM, Bjorn Helgaas wrote: >> Since Oza's DPC/AER patch to refactor fatal error handling, both >> hotplug driver and AER/DPC driver will try removing devices and >> perform enumeration on link events/AER events. >> >> Perfect environment for race condition without a change. >

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-06-22 Thread Bjorn Helgaas
[+cc Alex] On Tue, Jun 19, 2018 at 06:21:43PM -0400, Sinan Kaya wrote: > On 6/19/2018 5:43 PM, Bjorn Helgaas wrote: > >> Hotplug driver removes the device from system when a link down interrupt > >> is observed and performs re-enumeration when link up interrupt is observed. > >> > >> This

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-06-22 Thread Bjorn Helgaas
[+cc Alex] On Tue, Jun 19, 2018 at 06:21:43PM -0400, Sinan Kaya wrote: > On 6/19/2018 5:43 PM, Bjorn Helgaas wrote: > >> Hotplug driver removes the device from system when a link down interrupt > >> is observed and performs re-enumeration when link up interrupt is observed. > >> > >> This

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-06-19 Thread Sinan Kaya
On 6/19/2018 5:43 PM, Bjorn Helgaas wrote: >> Hotplug driver removes the device from system when a link down interrupt >> is observed and performs re-enumeration when link up interrupt is observed. >> >> This conflicts with what this code is trying to do. Try secondary bus reset >> only if

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-06-19 Thread Sinan Kaya
On 6/19/2018 5:43 PM, Bjorn Helgaas wrote: >> Hotplug driver removes the device from system when a link down interrupt >> is observed and performs re-enumeration when link up interrupt is observed. >> >> This conflicts with what this code is trying to do. Try secondary bus reset >> only if

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-06-19 Thread Bjorn Helgaas
On Thu, Apr 19, 2018 at 03:56:23PM -0400, Sinan Kaya wrote: > The infiniband adapter might be connected to a PCI hotplug slot. Performing > secondary bus reset on a hotplug slot causes PCI link up/down interrupts. > > Hotplug driver removes the device from system when a link down interrupt > is

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-06-19 Thread Bjorn Helgaas
On Thu, Apr 19, 2018 at 03:56:23PM -0400, Sinan Kaya wrote: > The infiniband adapter might be connected to a PCI hotplug slot. Performing > secondary bus reset on a hotplug slot causes PCI link up/down interrupts. > > Hotplug driver removes the device from system when a link down interrupt > is

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-25 Thread Sinan Kaya
On 4/23/2018 3:10 PM, Alex Williamson wrote: >> Do we need a retrain API with the speed that driver wants to reach to? >> API can return what was actually accomplished. The quirk from Alex can >> run inside this API to make a decision on what speed do we actually want >> to reach to for a given

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-25 Thread Sinan Kaya
On 4/23/2018 3:10 PM, Alex Williamson wrote: >> Do we need a retrain API with the speed that driver wants to reach to? >> API can return what was actually accomplished. The quirk from Alex can >> run inside this API to make a decision on what speed do we actually want >> to reach to for a given

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-23 Thread Alex Williamson
On Mon, 23 Apr 2018 15:23:11 -0500 Bjorn Helgaas wrote: > On Mon, Apr 23, 2018 at 01:10:44PM -0600, Alex Williamson wrote: > > On Mon, 23 Apr 2018 13:28:22 -0400 > > Sinan Kaya wrote: > > > > > On 4/20/2018 11:04 AM, Alex Williamson wrote: > > > >

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-23 Thread Alex Williamson
On Mon, 23 Apr 2018 15:23:11 -0500 Bjorn Helgaas wrote: > On Mon, Apr 23, 2018 at 01:10:44PM -0600, Alex Williamson wrote: > > On Mon, 23 Apr 2018 13:28:22 -0400 > > Sinan Kaya wrote: > > > > > On 4/20/2018 11:04 AM, Alex Williamson wrote: > > > > Is there a concern here about whether the

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-23 Thread Bjorn Helgaas
On Mon, Apr 23, 2018 at 01:10:44PM -0600, Alex Williamson wrote: > On Mon, 23 Apr 2018 13:28:22 -0400 > Sinan Kaya wrote: > > > On 4/20/2018 11:04 AM, Alex Williamson wrote: > > > Is there a concern here about whether the endpoint device driver or the > > > PCI core really

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-23 Thread Bjorn Helgaas
On Mon, Apr 23, 2018 at 01:10:44PM -0600, Alex Williamson wrote: > On Mon, 23 Apr 2018 13:28:22 -0400 > Sinan Kaya wrote: > > > On 4/20/2018 11:04 AM, Alex Williamson wrote: > > > Is there a concern here about whether the endpoint device driver or the > > > PCI core really knows better about

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-23 Thread Sinan Kaya
On 4/23/2018 3:10 PM, Alex Williamson wrote: >> But, we need to think about what to do about VFIO and other endpoint >> initiated reset cases. My suggestion was to move this into a single API and >> remove all other APIs from include/linux/pci.h. > I'm a little confused about the relation between

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-23 Thread Sinan Kaya
On 4/23/2018 3:10 PM, Alex Williamson wrote: >> But, we need to think about what to do about VFIO and other endpoint >> initiated reset cases. My suggestion was to move this into a single API and >> remove all other APIs from include/linux/pci.h. > I'm a little confused about the relation between

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-23 Thread Alex Williamson
On Mon, 23 Apr 2018 13:28:22 -0400 Sinan Kaya wrote: > On 4/20/2018 11:04 AM, Alex Williamson wrote: > > Is there a concern here about whether the endpoint device driver or the > > PCI core really knows better about link retraining? This makes me > > remember my unfinished

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-23 Thread Alex Williamson
On Mon, 23 Apr 2018 13:28:22 -0400 Sinan Kaya wrote: > On 4/20/2018 11:04 AM, Alex Williamson wrote: > > Is there a concern here about whether the endpoint device driver or the > > PCI core really knows better about link retraining? This makes me > > remember my unfinished (and need to revisit)

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-23 Thread Sinan Kaya
On 4/20/2018 11:04 AM, Alex Williamson wrote: > Is there a concern here about whether the endpoint device driver or the > PCI core really knows better about link retraining? This makes me > remember my unfinished (and need to revisit) Pericom quirk[1] where > errata in the PCIe switch requires

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-23 Thread Sinan Kaya
On 4/20/2018 11:04 AM, Alex Williamson wrote: > Is there a concern here about whether the endpoint device driver or the > PCI core really knows better about link retraining? This makes me > remember my unfinished (and need to revisit) Pericom quirk[1] where > errata in the PCIe switch requires

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Alex Williamson
On Fri, 20 Apr 2018 09:00:49 -0500 Bjorn Helgaas wrote: > [+cc Rajat, Alex because of their interest in the reset/hotplug issue] > > For context, Sinan's patch is this: > > > diff --git a/drivers/infiniband/hw/hfi1/pcie.c > > b/drivers/infiniband/hw/hfi1/pcie.c > > index

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Alex Williamson
On Fri, 20 Apr 2018 09:00:49 -0500 Bjorn Helgaas wrote: > [+cc Rajat, Alex because of their interest in the reset/hotplug issue] > > For context, Sinan's patch is this: > > > diff --git a/drivers/infiniband/hw/hfi1/pcie.c > > b/drivers/infiniband/hw/hfi1/pcie.c > > index 83d66e8..75f49e3

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Jason Gunthorpe
On Thu, Apr 19, 2018 at 10:11:27PM +, Deucher, Alexander wrote: > My understanding was that some platfoms only bring up the link in > gen 1 mode for compatibility reasons. TBH, I'm not that familiar > with how the links come up on different platforms. Then the platform firmware or

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Jason Gunthorpe
On Thu, Apr 19, 2018 at 10:11:27PM +, Deucher, Alexander wrote: > My understanding was that some platfoms only bring up the link in > gen 1 mode for compatibility reasons. TBH, I'm not that familiar > with how the links come up on different platforms. Then the platform firmware or

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Jason Gunthorpe
On Thu, Apr 19, 2018 at 04:47:23PM -0500, Bjorn Helgaas wrote: > I *thought* the hardware was supposed to automatically negotiate to > the highest rate supported by both sides without any help at all from > software. But since several drivers have code to do it themselves, I > wonder if I'm

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Jason Gunthorpe
On Thu, Apr 19, 2018 at 04:47:23PM -0500, Bjorn Helgaas wrote: > I *thought* the hardware was supposed to automatically negotiate to > the highest rate supported by both sides without any help at all from > software. But since several drivers have code to do it themselves, I > wonder if I'm

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Sinan Kaya
On 4/20/2018 10:00 AM, Bjorn Helgaas wrote: > [+cc Rajat, Alex because of their interest in the reset/hotplug issue] > > For context, Sinan's patch is this: > >> diff --git a/drivers/infiniband/hw/hfi1/pcie.c >> b/drivers/infiniband/hw/hfi1/pcie.c >> index 83d66e8..75f49e3 100644 >> ---

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Sinan Kaya
On 4/20/2018 10:00 AM, Bjorn Helgaas wrote: > [+cc Rajat, Alex because of their interest in the reset/hotplug issue] > > For context, Sinan's patch is this: > >> diff --git a/drivers/infiniband/hw/hfi1/pcie.c >> b/drivers/infiniband/hw/hfi1/pcie.c >> index 83d66e8..75f49e3 100644 >> ---

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Dennis Dalessandro
>; open list:HFI1 DRIVER <linux-r...@vger.kernel.org>; open list ; Deucher, Alexander <alexander.deuc...@amd.com> Subject: Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset [+cc Alex, who might know why DRM drivers have their own PCIe Gen3 code] On Thu, Apr 19, 2018 at 02:26:32

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Dennis Dalessandro
-arm- m...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; Mike Marciniszyn ; Dennis Dalessandro ; Doug Ledford ; open list:HFI1 DRIVER ; open list ; Deucher, Alexander Subject: Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset [+cc Alex, who might know why DRM drivers have

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Bjorn Helgaas
[+cc Rajat, Alex because of their interest in the reset/hotplug issue] For context, Sinan's patch is this: > diff --git a/drivers/infiniband/hw/hfi1/pcie.c > b/drivers/infiniband/hw/hfi1/pcie.c > index 83d66e8..75f49e3 100644 > --- a/drivers/infiniband/hw/hfi1/pcie.c > +++

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-20 Thread Bjorn Helgaas
[+cc Rajat, Alex because of their interest in the reset/hotplug issue] For context, Sinan's patch is this: > diff --git a/drivers/infiniband/hw/hfi1/pcie.c > b/drivers/infiniband/hw/hfi1/pcie.c > index 83d66e8..75f49e3 100644 > --- a/drivers/infiniband/hw/hfi1/pcie.c > +++

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-19 Thread Sinan Kaya
On 4/19/2018 5:47 PM, Bjorn Helgaas wrote: >> Bjorn, would be appropriate to export pci_parent_bus_reset() or some >> variation therin?? > I agree it would be really nice if the PCI core could help out somehow > so we could get some of this code out of individual drivers. I can create a function

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-19 Thread Sinan Kaya
On 4/19/2018 5:47 PM, Bjorn Helgaas wrote: >> Bjorn, would be appropriate to export pci_parent_bus_reset() or some >> variation therin?? > I agree it would be really nice if the PCI core could help out somehow > so we could get some of this code out of individual drivers. I can create a function

RE: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-19 Thread Deucher, Alexander
t; open list:HFI1 DRIVER <linux-r...@vger.kernel.org>; open list ker...@vger.kernel.org>; Deucher, Alexander > <alexander.deuc...@amd.com> > Subject: Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset > > [+cc Alex, who might know why DRM drivers have

RE: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-19 Thread Deucher, Alexander
.@vger.kernel.org; linux-arm-ker...@lists.infradead.org; Mike > Marciniszyn ; Dennis Dalessandro > ; Doug Ledford ; > open list:HFI1 DRIVER ; open list ker...@vger.kernel.org>; Deucher, Alexander > > Subject: Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset >

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-19 Thread Bjorn Helgaas
[+cc Alex, who might know why DRM drivers have their own PCIe Gen3 code] On Thu, Apr 19, 2018 at 02:26:32PM -0600, Jason Gunthorpe wrote: > On Thu, Apr 19, 2018 at 03:56:23PM -0400, Sinan Kaya wrote: > > The infiniband adapter might be connected to a PCI hotplug slot. Performing > > secondary bus

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-19 Thread Bjorn Helgaas
[+cc Alex, who might know why DRM drivers have their own PCIe Gen3 code] On Thu, Apr 19, 2018 at 02:26:32PM -0600, Jason Gunthorpe wrote: > On Thu, Apr 19, 2018 at 03:56:23PM -0400, Sinan Kaya wrote: > > The infiniband adapter might be connected to a PCI hotplug slot. Performing > > secondary bus

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-19 Thread Sinan Kaya
On 4/19/2018 4:26 PM, Jason Gunthorpe wrote: > On Thu, Apr 19, 2018 at 03:56:23PM -0400, Sinan Kaya wrote: >> The infiniband adapter might be connected to a PCI hotplug slot. Performing >> secondary bus reset on a hotplug slot causes PCI link up/down interrupts. >> >> Hotplug driver removes the

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-19 Thread Sinan Kaya
On 4/19/2018 4:26 PM, Jason Gunthorpe wrote: > On Thu, Apr 19, 2018 at 03:56:23PM -0400, Sinan Kaya wrote: >> The infiniband adapter might be connected to a PCI hotplug slot. Performing >> secondary bus reset on a hotplug slot causes PCI link up/down interrupts. >> >> Hotplug driver removes the

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-19 Thread Jason Gunthorpe
On Thu, Apr 19, 2018 at 03:56:23PM -0400, Sinan Kaya wrote: > The infiniband adapter might be connected to a PCI hotplug slot. Performing > secondary bus reset on a hotplug slot causes PCI link up/down interrupts. > > Hotplug driver removes the device from system when a link down interrupt > is

Re: [PATCH 1/2] IB/hfi1: Try slot reset before secondary bus reset

2018-04-19 Thread Jason Gunthorpe
On Thu, Apr 19, 2018 at 03:56:23PM -0400, Sinan Kaya wrote: > The infiniband adapter might be connected to a PCI hotplug slot. Performing > secondary bus reset on a hotplug slot causes PCI link up/down interrupts. > > Hotplug driver removes the device from system when a link down interrupt > is