On Fri, Feb 02, 2018 at 02:38:34PM +0100, Stefan Roese wrote: > > On Tue, Jan 30, 2018 at 09:41:21AM +0100, Stefan Roese wrote: > >> Hotplugging of some PCIe devices on our platform sometimes leads to a > >> bounce of link-up and link-down events, resulting in problems in the > >> corresponding PCI drivers. > >> > >> Here an example of such a hotplug event bounce for a AHCI PCIe card: > >> ... > >> pciehp 0000:00:1c.1:pcie004: Slot(1): Card present > >> pciehp 0000:00:1c.1:pcie004: Slot(1): Link Up > >> pciehp 0000:00:1c.1:pcie004: Slot(1): Link Up event ignored; already powering on > >> pciehp 0000:00:1c.1:pcie004: Slot(1): Link Down > >> pciehp 0000:00:1c.1:pcie004: Slot(1): Card present > >> pciehp 0000:00:1c.1:pcie004: Slot(1): Link Up > > I'm open for other / better ideas on how to solve this situation, we > are seeing on our systems. If a Link Up event is received and there is already a Link Up / Link Down pair in the queue, the Link Down event can be dequeued and the newly received Link Up event need not be queued. Same if a Link Down event is received and there is already a Link Down / Link Up pair in the queue. Thanks, Lukas