On Mon, Aug 26, 2013 at 5:36 PM, Yuval Mintz <yuvalmin@xxxxxxxxxxxx> wrote: >> > Hi, >> > >> > I tried adding support for the newly added 'pcie_get_minimum_link' into >> the >> > bnx2x driver, but found out the some of my devices started showing width >> x0. >> > >> > By adding debug prints, I've found out there were devices up the chain that >> > Showed 0 when their PCI_EXP_LNKSTA was read by said function. >> > However, when I tried looking via lspci the output claimed the width was >> x4. >> >> I don't see a 'pcie_get_minimum_link()' function in my current tree >> (git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git "next" >> branch). Maybe seeing your patch (with the debug prints) would give >> me a hook for somewhere to start looking. > > You've acked the patch and it was applied in net-next; Obviously it has yet > to migrate to your tree. Oh, yeah, that's right. I knew it sounded familiar, but I didn't remember where it went. Looking at its implementation, one obvious difference is that pcie_get_minimum_link() traverses up the hierarchy and keeps track of the minimum values it finds. lspci, on the other hand, just reads PCI_EXP_LNKSTA from a single device and decodes it. You said lspci reports x4 for every device from the Root Port all the way down to your NIC, so I would think the minimum from pcie_get_minimum_link() would be x4. But apparently it's not. Maybe there's a bug in it. Can you post the complete "lspci -vv" output along with your debug patch and output? Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html