Lines 738-743
static void vmd_copy_host_bridge_flags(struct pci_host_bridge *root_bridge,
Link Here
|
738 |
vmd_bridge->native_dpc = root_bridge->native_dpc; |
738 |
vmd_bridge->native_dpc = root_bridge->native_dpc; |
739 |
} |
739 |
} |
740 |
|
740 |
|
|
|
741 |
static int vmd_poweroff_dummy_pci(struct pci_dev *pdev, void *userdata) |
742 |
{ |
743 |
if (pdev->vendor == 0x8086 && pdev->device == 0x09ab) |
744 |
pci_set_power_state(pdev, PCI_D3cold); |
745 |
return 0; |
746 |
} |
747 |
|
748 |
static int vmd_poweron_pci_device(struct pci_dev *pdev, void *userdata) |
749 |
{ |
750 |
pci_set_power_state(pdev, PCI_D0); |
751 |
return 0; |
752 |
} |
753 |
|
741 |
/* |
754 |
/* |
742 |
* Enable ASPM and LTR settings on devices that aren't configured by BIOS. |
755 |
* Enable ASPM and LTR settings on devices that aren't configured by BIOS. |
743 |
*/ |
756 |
*/ |
Lines 928-933
static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
Link Here
|
928 |
vmd_acpi_begin(); |
941 |
vmd_acpi_begin(); |
929 |
|
942 |
|
930 |
pci_scan_child_bus(vmd->bus); |
943 |
pci_scan_child_bus(vmd->bus); |
|
|
944 |
/* |
945 |
* Make PCI devices at D0 when enable PCI-PM L1 PM Substates from |
946 |
* Section 5.5.4 of PCIe Base Spec Revision 5.0 Version 0.1 |
947 |
*/ |
948 |
pci_walk_bus(vmd->bus, vmd_poweron_pci_device, NULL); |
949 |
|
931 |
vmd_domain_reset(vmd); |
950 |
vmd_domain_reset(vmd); |
932 |
|
951 |
|
933 |
/* When Intel VMD is enabled, the OS does not discover the Root Ports |
952 |
/* When Intel VMD is enabled, the OS does not discover the Root Ports |
Lines 941-949
static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
Link Here
|
941 |
if (!list_empty(&child->devices)) { |
960 |
if (!list_empty(&child->devices)) { |
942 |
dev = list_first_entry(&child->devices, |
961 |
dev = list_first_entry(&child->devices, |
943 |
struct pci_dev, bus_list); |
962 |
struct pci_dev, bus_list); |
944 |
ret = pci_reset_bus(dev); |
963 |
//ret = pci_reset_bus(dev); |
945 |
if (ret) |
964 |
//if (ret) |
946 |
pci_warn(dev, "can't reset device: %d\n", ret); |
965 |
// pci_warn(dev, "can't reset device: %d\n", ret); |
947 |
|
966 |
|
948 |
break; |
967 |
break; |
949 |
} |
968 |
} |
Lines 1065-1070
static int vmd_suspend(struct device *dev)
Link Here
|
1065 |
struct vmd_dev *vmd = pci_get_drvdata(pdev); |
1084 |
struct vmd_dev *vmd = pci_get_drvdata(pdev); |
1066 |
int i; |
1085 |
int i; |
1067 |
|
1086 |
|
|
|
1087 |
pci_walk_bus(vmd->dev->bus, vmd_poweroff_dummy_pci, NULL); |
1088 |
|
1068 |
for (i = 0; i < vmd->msix_count; i++) |
1089 |
for (i = 0; i < vmd->msix_count; i++) |
1069 |
devm_free_irq(dev, vmd->irqs[i].virq, &vmd->irqs[i]); |
1090 |
devm_free_irq(dev, vmd->irqs[i].virq, &vmd->irqs[i]); |
1070 |
|
1091 |
|