right.We should do slot reset if driver required, but it's different from the `slot reset` in pci_bus_error_reset().IIUC, your concern is whether it is correct to trigger reset for
Previously we don't do a slot reset and call ->slot_reset() directly, I don't know the certain reason.
pci_channel_io_normal case right ? Please correct me if my
assumption is incorrect.
If its true, then why would report_error_detected() will returnIf we get PCI_ERS_*_NEED_RESET, we should do slot reset, no matter it's a
PCI_ERS_*_NEED_RESET for pci_channel_io_normal case ? If
report_error_detected() requests reset in pci_channel_io_normal
case then I think we should give preference to it.
hotpluggable slot or not.
two separate things. The `slot reset` done in aer_root_reset() is only for *linkI agree.
reset*, as there may have some side effects to perform secondary bus reset directly
for hotpluggable slot, as mentioned in commit c4eed62a2143, so it use slot reset
to do the reset link things.
As for slot reset required by the driver, we should perform it later just before the
->slot_reset(). I noticed the TODO comments there and we should implement
it if it's necessary.
It lies in line 183, drivers/pcie/err.c:
if (status == PCI_ERS_RESULT_NEED_RESET) {
/*
* TODO: Should call platform-specific
* functions to reset slot before calling
* drivers' slot_reset callbacks?
*/
status = PCI_ERS_RESULT_RECOVERED;
pci_dbg(dev, "broadcast slot_reset message\n");
pci_walk_bus(bus, report_slot_reset, &status);
}