On Fri, Jul 10, 2020 at 09:30:03PM +0200, Pali Rohár wrote: > On Friday 10 July 2020 11:08:28 Bjorn Helgaas wrote: > > On Fri, Jul 10, 2020 at 05:44:58PM +0200, Pali Rohár wrote: > > > I can reproduce following issue: Connect Compex WLE900VX card, configure > > > aardvark to gen2 mode. And then card is detected only after the first > > > link training. If kernel tries to retrain link again (e.g. via ASPM > > > code) then card is not detected anymore. > > > > Somebody should go over the ASPM retrain link code and the PCIe spec > > with a fine-toothed comb. Maybe we're doing something wrong there. > > I think this is not ASPM related as card simply disappear just after > flipping PCI_EXP_LNKCTL_RL bit second time without changing ASPM bits. Right. The retrain code in aspm.c doesn't really have anything in particular to do with ASPM and it should probably be moved elsewhere. So I think the problem may be related to retrain and the delays after it in general, not to ASPM. > There is absolutely nothing regarding to timings in documentation which > I saw. In documentation are just instructions/steps how to init PCI > subsystem and it is basically advk_pcie_setup_hw() function. > > > > I read in kernel bugzilla that WLE600VX and WLE900VX cards are buggy and > > > more people have problems with them. But issues described in kernel > > > bugzilla (like card is reporting incorrect PCI device id) I'm not > > > observing. > > Hm... I cannot find right now pointer to bugzilla, but I have pointer to > ath9k-devel mailing list with that incorrect device id: > > https://www.mail-archive.com/ath9k-devel@xxxxxxxxxxxxxxx/msg07529.html > > > Is the incorrect device ID 0xffff? > > No, incorrect device ID in that case is 0xabcd and vendor ID is correct > (Qualcomm). >From a quick look at that thread, it sounds like the device isn't quite ready yet. In that case, it's supposed to respond with Config Request Retry Status, and Linux is supposed to wait longer and retry. But I don't think Linux does that quite correctly, so it could be either a hardware problem or Linux being broken. But I guess that's not the current problem so I don't want to go down that rathole right now.