core/pci: Enforce polling PCIe link in hot-add path
core/pci: Enforce polling PCIe link in hot-add path

In surprise hot-add path, the power state isn't changed on hardware.
Instead, we set the cached power state (@slot->power_state) and
return OPAL_SUCCESS. The upper layer starts the PCI probing immediately
when receiving OPAL_SUCCESS. However, the PCIe link behind the PCI
slot is likely down. Nothing will be probed from the PCI slot even
we do have PCI adpater connected to the slot.

This fixes the issue by returning OPAL_ASYNC_COMPLETION to force
upper layer to poll the PCIe link before probing the PCI devices
behind the slot in surprise and managed hot-add paths.

Cc: stable # 5.4.0+
Fixes: 51931bad325 ("core/pci: Claim surprise hotplug capability")
Reported-by: Hank Chang <fd97803495ddce2043fe3441833323d0468ac754@gmail.com>
Signed-off-by: Gavin Shan <c61f60b8ade60f0e58ccf6ba68b944fd31c4d00c@linux.vnet.ibm.com>
Tested-by: Willie Liauw <a0b432de0372c939c6d2b80bcee99136ee13e20b@supermicro.com.tw>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.vnet.ibm.com>

shenki/skiboot,qemu/skiboot,qemu/skiboot,legoater/skiboot,open-power/skiboot,legoater/skiboot,legoater/skiboot,qemu/skiboot,stewart-ibm/skiboot,mikey/skiboot,open-power/skiboot,qemu/skiboot,stewart-ibm/skiboot,mikey/skiboot,qemu/skiboot,legoater/skiboot,open-power/skiboot,shenki/skiboot,legoater/skiboot,mikey/skiboot,shenki/skiboot,shenki/skiboot,open-power/skiboot,stewart-ibm/skiboot,open-power/skiboot,shenki/skiboot