Skip to contentSkip to conversation

A question about shpcp.

DISCUSSION Lukas Wunner 1 participant 1 message Jul 2, 2019 1 message not in the archive PCI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines · linmiaohe

In qemu+shpcp+pcie scene, hotplug a network card(virtio) would take more than 5 seconds. It's because 5 seconds delayed_work in func handle_button_press_event with case STATIC_STATE. And this will break some protocols with timeout within 5 seconds.
It's very nice of you if you could tell me why is 5*HZ there and if this delay can be reduced?

According to Table 2-4 of the PCI Standard Hot-Plug Controller and Subsystem Specification, "System software is waiting 5 seconds to provide the user with an opportunity to cancel the hot-plug operation."
(http://drydkim.com/MyDocuments/PCI%20Spec/specifications/shpc1_0.pdf)

So the reason the delay can't be reduced or removed is because the spec mandates it.

Thanks,

Lukas