When PCIe subsystem is operating as a
Root
Complex, it is the controller 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
RC
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 Controller
Enable” for End Points (see Section 12.2.2.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
RC.
- 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
RC.
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.2.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
Complex 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
Complex will be as follows:
- The PCIe subsystem in
RC
mode will issue the “Reset Request” interrupt when it detects link getting
disconnected unexpectedly.
- The PCIe subsystem will flush
all controller transactions and any completion data from pending
transactions. It will also start completing target transactions with error
completions.
- After servicing the interrupt
and disabling further interrupts, the system software must reset PCIe
subsystem
Root
Complex (see steps #4 and later specified previously in
this section).