lkml.org 
[lkml]   [2018]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PCI: pciehp: Report degraded links via link bandwidth notification
On Thu, Nov 29, 2018 at 06:57:37PM +0000, Alex_Gagniuc@Dellteam.com wrote:
> On 11/29/2018 11:36 AM, Bjorn Helgaas wrote:
> > On Wed, Nov 28, 2018 at 06:08:24PM -0600, Alexandru Gagniuc wrote:
> >> A warning is generated when a PCIe device is probed with a degraded
> >> link, but there was no similar mechanism to warn when the link becomes
> >> degraded after probing. The Link Bandwidth Notification provides this
> >> mechanism.
> >>
> >> Use the link bandwidth notification interrupt to detect bandwidth
> >> changes, and rescan the bandwidth, looking for the weakest point. This
> >> is the same logic used in probe().
> >
> > I like the concept of this. What I don't like is the fact that it's
> > tied to pciehp, since I don't think the concept of Link Bandwidth
> > Notification is related to hotplug. So I think we'll only notice this
> > for ports that support hotplug. Maybe it's worth doing it this way
> > anyway, even if it could be generalized in the future?
>
> That makes sense. At first, I thought that BW notification was tied to
> hotplug, but our PCIe spec writer disagreed with that assertion. I'm
> just not sure where to handle the interrupt otherwise.

I guess the interrupt is shared with hotplug and PME? In that case write
a separate pcie_port_service_driver and request the interrupt with
IRQF_SHARED. Define a new service type in drivers/pci/pcie/portdrv.h.
Amend get_port_device_capability() to check for PCI_EXP_LNKCAP_LBNC.

Thanks,

Lukas

\
 
 \ /
  Last update: 2018-11-29 20:13    [W:0.079 / U:6.532 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site