On Sat, Dec 7, 2013 at 10:35 AM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote: > > This doesn't sound like a chipset bug. It sounds like exactly what > the spec describes: "Presence Detect State – This bit indicates the > presence of an adapter in the slot, reflected by the logical “OR” of > the Physical Layer in-band presence detect mechanism and, if present, > any out-of-band presence detect mechanism defined for the slot’s > corresponding form factor" (PCIe 3.0, sec 7.8.11). Not sure. the silicon does not report in-band correctly if we turn off pcie link before turn the power of card. case 1: a. disable pci link b. turn off power of pci cards c. Present bit: card present. d. remove the card. e. Present bit: card is present. case 2: a. turn off power of pci cards b. disable pci link c. Present bit: card present. d. remove the card. e. Present bit: card is NOT present. case 3: a. disable pci link b. turn off power of pci cards c. Present bit: card present. d. turn on pcie link e. wait 20ms f. turn off pcie link g. remove the card. h. Present bit: card is NOT present. > > So I want to fix this pciehp problem, but between 2debd9289997 and > this patch, pciehp_power_off_slot() is accumulating warts that make it > look like we're just reacting to things that break rather than making > a robust design to start with. We have 2debd9289997 (turn off link before turn off power) to avoid some AER .... with this patch we still keep that and link off also have presence detect work correctly. Yinghai -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html