pci/hotplug/pnv-php: Disable surprise hotplug capability on conflicts

am: 54eff720c9

Change-Id: I1420772893847955dfd3ae3c1746a72e8cb849e3
This commit is contained in:
Gavin Shan
2017-03-15 02:23:19 +00:00
committed by android-build-merger

View File

@@ -799,6 +799,14 @@ static void pnv_php_enable_irq(struct pnv_php_slot *php_slot)
struct pci_dev *pdev = php_slot->pdev;
int irq, ret;
/*
* The MSI/MSIx interrupt might have been occupied by other
* drivers. Don't populate the surprise hotplug capability
* in that case.
*/
if (pci_dev_msi_enabled(pdev))
return;
ret = pci_enable_device(pdev);
if (ret) {
dev_warn(&pdev->dev, "Error %d enabling device\n", ret);