Hello, The platform I am working on is rtl simulation of pcie switch(Gen6) with a backdoor mechanism to trigger the HotPlug event. Tried following patches independently to have both hotplug and dpc driver register and handle respective events. https://patchwork.ozlabs.org/project/linux-pci/patch/20231223212235.34293-2-mattc@xxxxxxxxxxxxxxx/ https://patchwork.kernel.org/project/linux-pci/patch/20240108194642.30460-1-mattc@xxxxxxxxxxxxxxx/#25680870 Tried following - Trigger hot removal and add, the event is triggered and respective msi in /proc/interrupt increments and kernel logs the event(dmesg) - Trigger hot removal and add, the event is triggered and respective msi in /proc/interrupt increments and kernel logs the event(dmesg) - Trigger DPC using "DPC software trigger" in DPC control register The kernel hangs, the console is non-responsive. Can dpc and pciehp co-exist and handle the events? On Thu, 3 Oct 2024 at 20:22, Maverickk 78 <maverickk1778@xxxxxxxxx> wrote: > > Thanks Bjorn, > > Enabled "No Command Completed Support" in switch firmware init, now Timeouts are not seen now. > > I had question about "DPC", DPC driver probe is not invoked though down stream port advertises dpc extended capability. > > Does kernel expects uefi/bios to pass some _OSC flag for kernel to invoke dpc driver probe? > > On Tue, 1 Oct 2024, 23:49 Keith Busch, <kbusch@xxxxxxxxxx> wrote: >> >> On Tue, Oct 01, 2024 at 11:39:33PM +0530, Maverickk 78 wrote: >> > I was able to trigger an interrupt, the pciehp_isr was triggered and >> > there are "Timeouts" while processing the hotplug, >> > I suspect this is due to the slowness of the simulation platform, is >> > my assumption correct? >> >> That usually means the slot does not generate software notification, but >> for whatever reason decided not set the "No Command Completed Support" >> in the slot capability structure. >> >> > [26599.580420] pcieport 0000:02:01.0: pciehp: pending interrupts 0x0001 from Slot Status >> > [26599.580575] pcieport 0000:02:01.0: pciehp: Slot(0): Button press: will power on in 5 sec >> > [26599.593768] pcieport 0000:02:01.0: pciehp: Timeout on hotplug command 0x17e1 (issued 42213 msec ago) >> > [26599.598920] pcieport 0000:02:01.0: pciehp: pciehp_set_indicators: SLOTCTRL 80 write cmd 2c0 >> > [26605.104802] pcieport 0000:02:01.0: pciehp: pciehp_check_link_active: lnk_status = 2025 >> > [26605.104840] pcieport 0000:02:01.0: pciehp: Slot(0): Link Up >> > [26605.109616] pcieport 0000:02:01.0: pciehp: pciehp_get_power_status: SLOTCTRL 80 value read 16e1 >> > [26605.126589] pcieport 0000:02:01.0: pciehp: Timeout on hotplug command 0x16e1 (issued 5528 msec ago) >> > [26606.458516] pcieport 0000:02:01.0: pciehp: Timeout on hotplug command 0x12e1 (issued 1327 msec ago) >> > [26606.458554] pcieport 0000:02:01.0: pciehp: pciehp_power_on_slot: SLOTCTRL 80 write cmd 0 >> > [26606.475509] pcieport 0000:02:01.0: pciehp: Timeout on hotplug command 0x12e1 (issued 1344 msec ago) >> > [26606.481024] pcieport 0000:02:01.0: pciehp: pciehp_set_indicators: SLOTCTRL 80 write cmd 200 >> > [26606.618088] pcieport 0000:02:01.0: pciehp: pciehp_check_link_status: lnk_status = 2025 >> > [26606.674790] pci 0000:03:00.0: [abcd:0000] type 00 class 0x000000 PCIe Endpoint >> > [26606.725288] pci 0000:03:00.0: BAR 0 [mem 0xf8000000-0xf9ffffff] >> > [26607.867503] pci 0000:03:00.0: 63.014 Gb/s available PCIe bandwidth, limited by 32.0 GT/s PCIe x2 link at 0000:02:01.0 (capable of 1024.000 Gb/s with 64.0 GT/s PCIe x16 link) >> > [26608.386085] pci 0000:03:00.0: vgaarb: pci_notify >> > [26608.491596] pcieport 0000:02:01.0: distributing available resources >> > [26608.491637] pcieport 0000:02:01.0: PCI bridge to [bus 03] >> > [26608.495947] pcieport 0000:02:01.0: bridge window [io 0x1000-0x1fff] >> > [26608.513041] pcieport 0000:02:01.0: bridge window [mem 0xf8000000-0xf9ffffff] >> > [26608.521771] pcieport 0000:02:01.0: bridge window [mem 0xfe200000-0xfe3fffff 64bit pref] >> > [26608.647492] pcieport 0000:02:01.0: pciehp: Timeout on hotplug command 0x12e1 (issued 2167 msec ago) >> > [26608.652270] pcieport 0000:02:01.0: pciehp: pciehp_set_indicators: SLOTCTRL 80 write cmd 1c0