Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-28 Thread Lukas Wunner
On Wed, Mar 17, 2021 at 01:02:07PM -0700, Kuppuswamy, Sathyanarayanan wrote: > On 3/17/21 12:01 PM, Lukas Wunner wrote: > > If the events are ignored, the driver of the device in the hotplug slot > > is not unbound and rebound. So the driver must be able to cope with > > loss of TLPs during DPC

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-28 Thread Lukas Wunner
On Sat, Mar 27, 2021 at 10:49:45PM -0700, Kuppuswamy, Sathyanarayanan wrote: > On 3/16/21 9:13 PM, Lukas Wunner wrote: > > --- a/drivers/pci/hotplug/pciehp_hpc.c > > +++ b/drivers/pci/hotplug/pciehp_hpc.c > > @@ -707,6 +707,17 @@ static irqreturn_t pciehp_ist(int irq, void *dev_id) > > } > >

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-27 Thread Kuppuswamy, Sathyanarayanan
On 3/16/21 9:13 PM, Lukas Wunner wrote: On Fri, Mar 12, 2021 at 07:32:08PM -0800, sathyanarayanan.kuppusw...@linux.intel.com wrote: + if ((events == PCI_EXP_SLTSTA_DLLSC) && is_dpc_reset_active(pdev)) { + ctrl_info(ctrl, "Slot(%s): DLLSC event(DPC), skipped\n", +

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-18 Thread Sinan Kaya
On 3/17/2021 4:02 PM, Kuppuswamy, Sathyanarayanan wrote: > My point is, there is no race in OS handlers (pciehp_ist() vs > pcie_do_recovery()) >  However, Sinan wrote in >> 2018 that one of the issues with hotplug versus DPC is that pciehp >> may turn off slot power and thereby foil DPC recovery. 

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-17 Thread Kuppuswamy, Sathyanarayanan
On 3/17/21 12:01 PM, Lukas Wunner wrote: On Wed, Mar 17, 2021 at 10:54:09AM -0700, Sathyanarayanan Kuppuswamy Natarajan wrote: Flush of hotplug event after successful recovery, and a simulated hotplug link down event after link recovery fails should solve the problems raised by Lukas. I

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-17 Thread Lukas Wunner
On Wed, Mar 17, 2021 at 12:22:41PM -0700, Raj, Ashok wrote: > On Wed, Mar 17, 2021 at 08:09:52PM +0100, Lukas Wunner wrote: > > On Wed, Mar 17, 2021 at 10:45:21AM -0700, Dan Williams wrote: > > > Ah, ok, we're missing a flush of the hotplug event handler after the > > > link is up to make sure the

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-17 Thread Raj, Ashok
On Wed, Mar 17, 2021 at 08:09:52PM +0100, Lukas Wunner wrote: > On Wed, Mar 17, 2021 at 10:45:21AM -0700, Dan Williams wrote: > > Ah, ok, we're missing a flush of the hotplug event handler after the > > link is up to make sure the hotplug handler does not see the Link Up. > > I'm not immediately

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-17 Thread Lukas Wunner
On Wed, Mar 17, 2021 at 10:45:21AM -0700, Dan Williams wrote: > Ah, ok, we're missing a flush of the hotplug event handler after the > link is up to make sure the hotplug handler does not see the Link Up. > I'm not immediately seeing how the new proposal ensures that there is > no Link Up event

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-17 Thread Lukas Wunner
On Wed, Mar 17, 2021 at 10:54:09AM -0700, Sathyanarayanan Kuppuswamy Natarajan wrote: > Flush of hotplug event after successful recovery, and a simulated > hotplug link down event after link recovery fails should solve the > problems raised by Lukas. I assume Lukas' proposal adds this support. >

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-17 Thread Sathyanarayanan Kuppuswamy Natarajan
Hi, On Wed, Mar 17, 2021 at 10:45 AM Dan Williams wrote: > > On Wed, Mar 17, 2021 at 10:20 AM Sathyanarayanan Kuppuswamy Natarajan > wrote: > > > > Hi, > > > > On Wed, Mar 17, 2021 at 9:31 AM Dan Williams > > wrote: > > > > > > On Tue, Mar 16, 2021 at 10:31 PM Lukas Wunner wrote: > > > > > >

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-17 Thread Dan Williams
On Wed, Mar 17, 2021 at 10:20 AM Sathyanarayanan Kuppuswamy Natarajan wrote: > > Hi, > > On Wed, Mar 17, 2021 at 9:31 AM Dan Williams wrote: > > > > On Tue, Mar 16, 2021 at 10:31 PM Lukas Wunner wrote: > > > > > > On Tue, Mar 16, 2021 at 10:08:31PM -0700, Dan Williams wrote: > > > > On Tue, Mar

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-17 Thread Sathyanarayanan Kuppuswamy Natarajan
Hi, On Wed, Mar 17, 2021 at 9:31 AM Dan Williams wrote: > > On Tue, Mar 16, 2021 at 10:31 PM Lukas Wunner wrote: > > > > On Tue, Mar 16, 2021 at 10:08:31PM -0700, Dan Williams wrote: > > > On Tue, Mar 16, 2021 at 9:14 PM Lukas Wunner wrote: > > > > > > > > On Fri, Mar 12, 2021 at 07:32:08PM

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-17 Thread Dan Williams
On Tue, Mar 16, 2021 at 10:31 PM Lukas Wunner wrote: > > On Tue, Mar 16, 2021 at 10:08:31PM -0700, Dan Williams wrote: > > On Tue, Mar 16, 2021 at 9:14 PM Lukas Wunner wrote: > > > > > > On Fri, Mar 12, 2021 at 07:32:08PM -0800, > > > sathyanarayanan.kuppusw...@linux.intel.com wrote: > > > > +

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-16 Thread Lukas Wunner
On Tue, Mar 16, 2021 at 10:08:31PM -0700, Dan Williams wrote: > On Tue, Mar 16, 2021 at 9:14 PM Lukas Wunner wrote: > > > > On Fri, Mar 12, 2021 at 07:32:08PM -0800, > > sathyanarayanan.kuppusw...@linux.intel.com wrote: > > > + if ((events == PCI_EXP_SLTSTA_DLLSC) &&

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-16 Thread Dan Williams
On Tue, Mar 16, 2021 at 9:14 PM Lukas Wunner wrote: > > On Fri, Mar 12, 2021 at 07:32:08PM -0800, > sathyanarayanan.kuppusw...@linux.intel.com wrote: > > + if ((events == PCI_EXP_SLTSTA_DLLSC) && is_dpc_reset_active(pdev)) { > > + ctrl_info(ctrl, "Slot(%s): DLLSC event(DPC),

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-16 Thread Lukas Wunner
On Fri, Mar 12, 2021 at 07:32:08PM -0800, sathyanarayanan.kuppusw...@linux.intel.com wrote: > + if ((events == PCI_EXP_SLTSTA_DLLSC) && is_dpc_reset_active(pdev)) { > + ctrl_info(ctrl, "Slot(%s): DLLSC event(DPC), skipped\n", > + slot_name(ctrl)); > +

Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-12 Thread Kuppuswamy, Sathyanarayanan
On 3/12/21 7:32 PM, sathyanarayanan.kuppusw...@linux.intel.com wrote: From: Kuppuswamy Sathyanarayanan When hotplug and DPC are both enabled on a Root port or Downstream Port, during DPC events that cause a DLLSC link down/up events, such events (DLLSC) must be suppressed to let the DPC

[PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-12 Thread sathyanarayanan . kuppuswamy
From: Kuppuswamy Sathyanarayanan When hotplug and DPC are both enabled on a Root port or Downstream Port, during DPC events that cause a DLLSC link down/up events, such events (DLLSC) must be suppressed to let the DPC driver own the recovery path. When DPC is present and enabled, hardware will