Drivers must not release DMA mappings until a device has stopped accessing them. A failed device reset therefore needs a last resort way to disable PCI bus mastering, verify the command register write, and drain transactions initiated before the write. Add pci_fence_dma() for that operation. Also add pci_enable_busmaster_checked() so a driver recovering from a fence can verify BME restoration after it has reset stale device DMA state. Keep reset and recovery ordering under driver control. MFC after: 2 weeks
Details
Details
Pattern may replace analogs in drivers around things like firmware resets or failed init.
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped