Page MenuHomeFreeBSD

pci: restore configuration state after resetting a detached child
Needs ReviewPublic

Authored by nick_spun.io on Mon, Sep 7, 9:29 PM.
Tags
Referenced Files
F171016511: D59499.diff
Tue, Sep 8, 5:17 AM
F171010915: D59499.id186179.diff
Tue, Sep 8, 4:28 AM
F171003148: D59499.diff
Tue, Sep 8, 3:19 AM
F170996988: D59499.id186179.diff
Tue, Sep 8, 2:21 AM
Subscribers

Details

Summary

pcie_flr() saves and restores nothing; pairing it with
pci_save_state() and pci_restore_state() is the caller's job. On the
DEVF_RESET_DETACH path of pci_reset_child(), device_detach() saves
through pci_child_detached() and nothing restores. The only restore,
BUS_RESET_POST(), runs when pcie_flr() reports that no reset was
performed.

An FLR returns configuration space to its defaults, so the reprobe
runs against a function whose BARs read zero.

Restore the saved state before reprobing.

Diff Detail

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