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.

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