Why Loopback in LTSSM don't use TS2 Ordered sets
Many LTSSM training substates use TS1 and TS2 Ordered Sets, but states such as Hot Reset and Loopback use only TS1.
Loopback is a special PCIe state intended mainly for testing entire path. PCIe normally does not use Master/Slave terminology but the specs defines a Loopback Master and a Loopback Slave.
The device requesting Loopback is called Master, while the device that loops the received data back is called Slave. When Loopback operation is initiated, the Loopback Master enters Loopback.Entry and starts transmitting TS1 Ordered Sets with bit 2 of the Training Control field, called the Loopback bit, set to 1.
The Loopback Slave recognizes the Loopback request when it receives two consecutive TS1 Ordered Sets with the Loopback bit asserted. It then enters Loopback.Entry.
During Loopback.Entry, the Loopback Slave initially generates TS1 Ordered Sets with its own OS generator while its receiver acquires the required synchronization. MAC also instruct PIPE to bring PHY into loopback mode using the TxDetectRx/Loopback control signal. Once the PHY enters loopback mode, the transmitter stops using OS generator and starts retransmitting the data received by the PHY.
The Loopback Master continues transmitting TS1 OS with the Loopback bit asserted. Once the Master receives the required looped-back TS1 Ordered Sets, it can transition from Loopback.Entry to Loopback.Active.
In Loopback.Active, the Master start transmitting valid encoded test patterns, and the Loopback Slave retransmits the received encoded information back toward the Master.
This allows the Master or external test equipment to compare the transmitted pattern with the returned pattern and calculate the Bit Error Rate (BER).
Because signal cover complete round-trip PHY path, Loopback help us to check if entire path is working good.
When the Master wants to terminate Loopback operation, it enters Loopback.Exit, sends the required Electrical Idle Ordered Sets (EIOS), and then places its transmitter into Electrical Idle. The Loopback Slave detects the exit condition, enters Loopback.Exit, places its transmitter into Electrical Idle, and eventually both devices transition to Detect.
"Loopback does not use TS2 as a separate ack because eventually Slave return same TS1 as Master to enter into Loopback Active which implicilty provide ack hence separate TS2 is unnecessary."




