From: Don Dutile <ddutile@redhat.com> Date: Tue, 16 Jun 2009 00:34:28 -0400 Subject: [pci] fix pcie save restore patch Message-id: 4A3720D4.5090502@redhat.com O-Subject: [RHEL 5.4 PATCH] Fix pcie save restore patch Bugzilla: 505541 RH-Acked-by: Rik van Riel <riel@redhat.com> RH-Acked-by: Prarit Bhargava <prarit@redhat.com> RH-Acked-by: John W. Linville <linville@redhat.com> BZ 505541 The following patch was applied to the PCIe save restore patch that was part of the VTd & SRIOV patches to fix a breakage in ppc arch: linux-2.6-ppc64-resolves-issues-with-pcie-save-restore-state.patch Unfortunately, this patch caused a double call to pci_add_saved_cap(), causing in error in the linked-list of saved cap structure. This patch removes the second, incorrect call to pci_add_saved_cap(). Brew build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1843241 Tested by Jay Turner (reporter of error on his laptop). Please review & ack. - Don Note: this error causes an error in the linked-list of saved PCIe cap structures. It is *not limited* to VTd &/or SRIOV-capable systems. It can affect any PCIe system, depending on the order of PCIe scanning & needed PCI cap sturctures. This bug could break almost any PCIe system, thus, should be included in 5.4 beta. diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 9bc4ffb..4452dda 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -586,7 +586,6 @@ static int pci_save_pcie_state(struct pci_dev *dev) pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &cap[i++]); pci_read_config_word(dev, pos + PCI_EXP_LNKCTL2, &cap[i++]); pci_read_config_word(dev, pos + PCI_EXP_SLTCTL2, &cap[i++]); - pci_add_saved_cap(dev, save_state); return 0; }