Use PCI power-mgmt to reset a device if FLR fails.
authorPeter Grehan <grehan@FreeBSD.org>
Wed, 2 May 2018 17:41:00 +0000 (17:41 +0000)
committerPeter Grehan <grehan@FreeBSD.org>
Wed, 2 May 2018 17:41:00 +0000 (17:41 +0000)
commitadb947a67ad23f81deea85fd765d98493db1713d
tree064d9fcf4f8174e7ec0694dd11df4cd50adf9777
parent2695c9c1096d885a2446906a5dbd8681a4889055
Use PCI power-mgmt to reset a device if FLR fails.

A large number of devices don't support PCIe FLR, in particular
graphics adapters. Use PCI power management to perform the
reset if FLR fails or isn't available, by cycling the device
through the D3 state.

This has been tested by a number of users with Nvidia and AMD GPUs.

Submitted and tested by: Matt Macy
Reviewed by: jhb, imp, rgrimes
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D15268
sys/amd64/vmm/io/ppt.c