Messages in this thread | | | Date | Thu, 29 Nov 2018 21:30:12 +0200 | From | Mika Westerberg <> | Subject | Re: [PATCH] PCI: pciehp: Report degraded links via link bandwidth notification |
| |
On Thu, Nov 29, 2018 at 07:00:58PM +0000, Alex_Gagniuc@Dellteam.com wrote: > >> + if (link_status & PCI_EXP_LNKSTA_LBMS) { > >> + if (pdev->subordinate && pdev->subordinate->self) > >> + endpoint = pdev->subordinate->self; > > > > Hmm, I thought pdev->subordinate->self == pdev, no? > > That makes no sense, but I think you're right. I'm trying to get to the > other end of the PCIe link. Is there a simple way to do that? (other > than convoluted logic that all leads to the same mistake)
AFAIK you should be able to find the other end by looking at the pdev->subordinate->devices list. Not sure if there is a simpler way, though.
| |