Page MenuHomeFreeBSD

pci: wait for a function to answer again after a reset
Needs ReviewPublic

Authored by nick_spun.io on Mon, Sep 7, 9:14 PM.

Details

Summary

A function that has not finished resetting answers configuration
requests with all ones. pcie_flr() read PCIER_DEVICE_STA once after a
fixed sleep and so reported a transaction that does not exist:

pci0:9:0:0: Transactions pending after FLR!

pci_power_reset() waited only the 10 ms that pci_set_powerstate()
applies leaving D3.

The stale report is the smaller problem: callers restore configuration
state as soon as the reset returns, and a restore into a function that
is not answering is lost, leaving the BARs and command register clear.

Poll for the function to answer before returning.

PR: 296662

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76654
Build 73537: arc lint + arc unit