When PCIe subsystem is operating as a Root Port, it is the master controller on the PCIe subsystem. When PCIe subsystem is to be reset in this operating mode, the link to the downstream device will get disconnected. To accomplish this reset, the PCIe subsystem RP should issue a hot reset to End Point or Switch downstream. It should also stop any ongoing transactions. Then, a PCIe subsystem reset can be issued. The sequence of events is outlined below:
- Stop transactions at system and application level. This is recommended for graceful suspension of activity at system level. It is not required by PCIe subsystem though. Not choosing to gracefully stop transaction would cause some of the outstanding transactions to complete in error and it may be harmful from software stability standpoint.
- Disable “Bus Master Enable” for End Points (see Section 12.2.3.4.6.2, PCIe Transaction Limitations). Note that a hand shake with EP Software may be required as not all End Point application software will automatically become aware of this disable action from RP.
- Optionally, issue Hot Reset to End Point devices
via PCIE_USER_RSTCMD[0] INIT_HOT_RESET bit . Note that the link will be
getting disconnected. So, a reset may be happening regardless of the Hot
Reset command from RP. It depends on the architecture of the other
(external) device. In devices with PCIe subsystem, link disconnection
automatically results in a reset request interrupt. A PCIe subsystem reset
is required to get the memory buffers out of internal flush modes.
- Initiate Clock Stop sequence and wait for Acknowledgement. For more information, see Section 12.2.3.4.3.1, CBA Power Management.
- Issue reset to PCIe subsystem (local reset).
- Reinitialize PCIe subsystem and downstream devices. PCIe bus enumeration must be performed again.
Note that it is possible for Root Port to occasionally see the downstream device going down for some reason and disconnecting. Such events typically occur due to an internal error condition in the End Point. When such an event occurs, the sequence of events for the Root Port will be as follows:
- The PCIe subsystem in RP mode will issue the “Reset Request” interrupt when it detects link getting disconnected unexpectedly.
- The PCIe subsystem will flush all master transactions and any completion data from pending transactions. It will also start completing slave transactions with error completions.
- After servicing the interrupt and disabling further interrupts, the system software must reset PCIe subsystem Root Port (see steps #4 and later specified previously in this section).