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.
Tags
Referenced Files
F171023062: D59498.id.diff
Tue, Sep 8, 6:14 AM
F171021649: D59498.id186178.diff
Tue, Sep 8, 6:00 AM
F171017043: D59498.diff
Tue, Sep 8, 5:22 AM
F171005495: D59498.id186178.diff
Tue, Sep 8, 3:46 AM
F171004358: D59498.diff
Tue, Sep 8, 3:33 AM
Subscribers

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