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
Unknown Object (File)
Fri, Sep 25, 6:00 PM
Unknown Object (File)
Fri, Sep 25, 8:46 AM
Unknown Object (File)
Thu, Sep 24, 4:39 PM
Unknown Object (File)
Thu, Sep 24, 6:13 AM
Unknown Object (File)
Thu, Sep 24, 3:51 AM
Unknown Object (File)
Wed, Sep 23, 3:48 PM
Unknown Object (File)
Wed, Sep 23, 2:59 PM
Unknown Object (File)
Wed, Sep 23, 2:35 PM
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