BUS_RESET() method is implemented for pcie buses and pci devices.
For pcie bus,
- all devices below the bus are detached or suspended
- BUS_RESET_PREPARE() is called on each child
- the link is disabled on the downstream port, then retrained
- BUS_RESET_POST() is called on each child
- all children are re-attached or unsuspended.
PCIe standard only mentions that link disable causes conventional reset. Re-train does not seem to be automatic after the link is re-enabled.
For pci devices, the same dance with detach/prepare and post/reattach is done, but FLR is tried, then power reset if no FLR or FLR failed.
Sponsored by: Mellanox Technologies