RESET MECHANISM

Function Level Reset (FLR)

Reset individual functions without affecting other functions or the link

1. What is FLR?

What is Function Level Reset?

FLR (Function Level Reset) resets a single PCIe function to its initial state without affecting other functions in the same device or the PCIe link. Essential for virtualization and error recovery.

Reset Types Comparison

Reset Type Scope Link Impact
Fundamental Reset Entire device Link down (LTSSM to Detect)
Hot Reset Entire device TS1 with Hot Reset bit
FLR Single function No link impact

2. Why FLR?

Use Cases

3. FLR Capability

Device Capabilities Register

    Device Capabilities Register (Offset 04h in PCIe Capability):
    ┌──────────────────────────────────────────────────────────────┐
    │ Bit 28: FLR Capable                                          │
    │   0 = Function does not support FLR                          │
    │   1 = Function supports FLR                                  │
    └──────────────────────────────────────────────────────────────┘

Initiating FLR

    Device Control Register (Offset 08h in PCIe Capability):
    ┌──────────────────────────────────────────────────────────────┐
    │ Bit 15: Initiate Function Level Reset                        │
    │   Write 1 to initiate FLR                                   │
    │   Self-clearing (reads as 0)                                 │
    └──────────────────────────────────────────────────────────────┘

4. FLR Effects

What Gets Reset

What is Preserved

5. FLR Timing

Reset Duration

FLR Flow

    1. Software quiesces function (stop I/O)
           │
    2. Disable Bus Master Enable
           │
    3. Wait for outstanding transactions (Completion Timeout)
           │
    4. Write 1 to Initiate FLR bit
           │
    5. Wait 100ms (or per Readiness Time Reporting)
           │
    6. Check for FRS message (if supported)
           │
    7. Reconfigure function

6. FLR and SR-IOV

VF FLR

PF FLR

7. Linux FLR

    # Check FLR capability
    lspci -vvv -s 03:00.0 | grep "FLReset"
    
    # Trigger FLR via sysfs
    echo 1 > /sys/bus/pci/devices/0000:03:00.0/reset
    
    # Using setpci
    # Read Device Control, set bit 15, write back

8. FLR Rules