Patchwork [4/7] PCI, cpqphp: disable ARI forwarding for cpqphp

login
register
mail settings
Submitter Yijing Wang
Date Oct. 9, 2012, 3:03 a.m.
Message ID <1349751804-7476-5-git-send-email-wangyijing@huawei.com>
Download mbox | patch
Permalink /patch/190178/
State Superseded
Headers show

Comments

Yijing Wang - Oct. 9, 2012, 3:03 a.m.
Disable the port ARI forwarding after an ARI device hot removed.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
 drivers/pci/hotplug/cpci_hotplug_pci.c |    1 +
 drivers/pci/hotplug/cpqphp_pci.c       |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c
index dcc75c7..d59d228 100644
--- a/drivers/pci/hotplug/cpci_hotplug_pci.c
+++ b/drivers/pci/hotplug/cpci_hotplug_pci.c
@@ -319,6 +319,7 @@  int cpci_unconfigure_slot(struct slot* slot)
 				    PCI_DEVFN(PCI_SLOT(slot->devfn), i));
 		if (dev) {
 			pci_stop_and_remove_bus_device(dev);
+			pci_configure_ari(dev, false);
 			pci_dev_put(dev);
 		}
 	}
diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c
index 09801c6..a818c1a 100644
--- a/drivers/pci/hotplug/cpqphp_pci.c
+++ b/drivers/pci/hotplug/cpqphp_pci.c
@@ -128,6 +128,7 @@  int cpqhp_unconfigure_device(struct pci_func* func)
 		if (temp) {
 			pci_dev_put(temp);
 			pci_stop_and_remove_bus_device(temp);
+			pci_configure_ari(temp, false);
 		}
 	}
 	return 0;