From patchwork Tue Oct 9 03:03:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4/7] PCI, cpqphp: disable ARI forwarding for cpqphp From: Yijing Wang X-Patchwork-Id: 190178 Message-Id: <1349751804-7476-5-git-send-email-wangyijing@huawei.com> To: Bjorn Helgaas Cc: , Hanjun Guo , , Yinghai Lu , Yijing Wang Date: Tue, 9 Oct 2012 11:03:21 +0800 Disable the port ARI forwarding after an ARI device hot removed. Signed-off-by: Yijing Wang --- drivers/pci/hotplug/cpci_hotplug_pci.c | 1 + drivers/pci/hotplug/cpqphp_pci.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) 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;