Link Basics
Who can stop a PCI Express link
A link that was stopped on purpose and a link that stopped itself need different answers, and the first diagnostic act is naming which happened.
Who is allowed to stop a link
A PCI Express link can be stopped by software, by hardware or by physics, and each path has a different name. Software writes the Link Disable bit in the Link Control register. The hardware drops into Disabled or Detect when it loses its partner. Physics stops it when the card leaves the connector. This page keeps the three apart, because a link that was stopped on purpose and a link that stopped itself need different answers.
The deliberate stop is a documented control. The Link Control register carries a Link Disable bit; setting it sends the training machine to Disabled, where the transmitter drives an electrical idle and stays there until the bit is cleared or the part is reset. The state is not a failure and not a sleep: it is a held position, designed for the case where software decides the link must not run. Diagnostic tools use it, hot-removal flows use it, and a platform that wants a device gone without removing its power uses it.
The pattern of one named authority holding a defined stop is wider than buses. In stunt and rigging work, a stunt desk's stop rules describe who on a set may call a halt and what the call obliges everyone else to do. The correspondence is not decorative: in both fields the stop only works because it is named in advance, limited to a defined authority, and reversible by a defined act.
The stop that is not a command
The second path is the machine stopping itself. If the far end disappears, if the receiver termination vanishes or the stream of ordered sets fails to arrive, the training state machine falls back toward Detect and stays there. From software this reads as a device that was present and is now absent, which is exactly what happens on a surprise removal. The card-edge detection and the expectations around it are described on the page about the card slot; the electrical sequence that follows the disappearance is the same machine described in the counted sequence.
Surprise down is the honest name for this case. The specification provides a Link Down path precisely because removal cannot be negotiated: a card cannot warn the machine that it is about to leave the connector. What the platform can do is bound the damage, which is what hot-plug plumbing exists for.
What does hot-plug change?
On a slot built for it, removal is staged rather than instant. An attention button or a software command begins the sequence; power is removed from the slot only after the link is down and the driver has released the device. The shorter presence pins, PRSNT1# and PRSNT2#, make contact last on insertion and break first on withdrawal, so the machine learns about the card before the power pins let go. That ordering is the difference between a managed stop and a crash: the same card leaving the same slot is either an event or a fault, depending on whether the presence pins reported first.
The Linux documentation of the hot-plug path, the kernel's PCI Express bus service howto, read on September 6, 2026, describes the port services that carry these events, including the pciehp driver that owns the slot mechanics. The recovery side, what the kernel attempts when a device reports a failed link rather than a removed one, is documented in the PCI error recovery guide, read the same day.
| Stop | Who orders it | What software sees |
|---|---|---|
| Link Disable bit | Software, through Link Control | Link down reported; device may remain enumerable |
| Surprise down | Physics; the far end vanishes | Device absent, reads return all ones |
| Managed hot removal | Operator plus pciehp | Staged: driver release, link down, power off |
| Fundamental reset | Platform or hot reset | Link re-enters Detect and retrains from count one |
Why does a disabled link stay enumerable?
Because Disabled stops the link, not the device. The configuration space of a held device can remain answerable, the BARs remain programmed, and the device can be brought back by clearing the bit, without the platform re-enumerating the fabric. That distinction is the whole point of the mechanism: the stop is cheap to reverse because nothing upstream forgot the device. The software view of what remains visible is set out in enumeration and configuration space.
A surprise down offers no such courtesy. Once the far end is gone the reads float, which is why drivers conventionally treat an all-ones read from configuration space as the signature of a departed device rather than a real register value.
Reading a stopped link on the bench
The diagnostic question is always the same: who stopped it. A link that software disabled sits exactly where it was put, and the Link Disable bit reads set. A link that went down by surprise shows no such bit and usually arrives with a platform log. A link that never came up at all is a different page entirely, closer to how a link trains than to anything on this one.
Checks that name the stop
- Read the Link Disable bit before assuming hardware trouble: a set bit means the stop was deliberate and reversible.
- An all-ones configuration read is the signature of a departed device, not a register value to debug.
- On a hot-plug slot, sequence the removal: attention or software first, card second, so the presence pins can report in order.
- After any stop, expect a full retrain from Detect; nothing resumes mid-count.
Common mistakes
- Treating Disabled as a fault state. It is a held position entered on instruction, and the bit that put it there is the bit that releases it.
- Pulling a card on an unmanaged slot and calling the result a hot plug. Without the presence ordering it is a surprise down.
- Debugging a missing device through its registers. A gone device returns ones, and the ones are not data.
- Assuming a stopped link forgot its partner. Enumeration remembers; only the link was stopped.
The stop is a feature with three different authors, and the first diagnostic act is naming which one wrote it. After that the path is fixed: clear the bit, reseat the card, or accept that physics got there first.
The page behind these facts
The Link Disable control, the hot-plug services and the recovery flow are documented in the kernel PCI Express bus service howto and the PCI error recovery documentation, both read on September 6, 2026. The mechanical side of presence detection is summarized in the Wikipedia article on hot swapping and the PCI Express article, read the same day.