aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i7300_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/i7300_edac.c')
-rw-r--r--drivers/edac/i7300_edac.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c
index d63f4798f7d0..57e96a3350f0 100644
--- a/drivers/edac/i7300_edac.c
+++ b/drivers/edac/i7300_edac.c
@@ -943,33 +943,35 @@ static int i7300_get_devices(struct mem_ctl_info *mci)
943 943
944 /* Attempt to 'get' the MCH register we want */ 944 /* Attempt to 'get' the MCH register we want */
945 pdev = NULL; 945 pdev = NULL;
946 while (!pvt->pci_dev_16_1_fsb_addr_map || 946 while ((pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
947 !pvt->pci_dev_16_2_fsb_err_regs) { 947 PCI_DEVICE_ID_INTEL_I7300_MCH_ERR,
948 pdev = pci_get_device(PCI_VENDOR_ID_INTEL, 948 pdev))) {
949 PCI_DEVICE_ID_INTEL_I7300_MCH_ERR, pdev);
950 if (!pdev) {
951 /* End of list, leave */
952 i7300_printk(KERN_ERR,
953 "'system address,Process Bus' "
954 "device not found:"
955 "vendor 0x%x device 0x%x ERR funcs "
956 "(broken BIOS?)\n",
957 PCI_VENDOR_ID_INTEL,
958 PCI_DEVICE_ID_INTEL_I7300_MCH_ERR);
959 goto error;
960 }
961
962 /* Store device 16 funcs 1 and 2 */ 949 /* Store device 16 funcs 1 and 2 */
963 switch (PCI_FUNC(pdev->devfn)) { 950 switch (PCI_FUNC(pdev->devfn)) {
964 case 1: 951 case 1:
965 pvt->pci_dev_16_1_fsb_addr_map = pdev; 952 if (!pvt->pci_dev_16_1_fsb_addr_map)
953 pvt->pci_dev_16_1_fsb_addr_map =
954 pci_dev_get(pdev);
966 break; 955 break;
967 case 2: 956 case 2:
968 pvt->pci_dev_16_2_fsb_err_regs = pdev; 957 if (!pvt->pci_dev_16_2_fsb_err_regs)
958 pvt->pci_dev_16_2_fsb_err_regs =
959 pci_dev_get(pdev);
969 break; 960 break;
970 } 961 }
971 } 962 }
972 963
964 if (!pvt->pci_dev_16_1_fsb_addr_map ||
965 !pvt->pci_dev_16_2_fsb_err_regs) {
966 /* At least one device was not found */
967 i7300_printk(KERN_ERR,
968 "'system address,Process Bus' device not found:"
969 "vendor 0x%x device 0x%x ERR funcs (broken BIOS?)\n",
970 PCI_VENDOR_ID_INTEL,
971 PCI_DEVICE_ID_INTEL_I7300_MCH_ERR);
972 goto error;
973 }
974
973 edac_dbg(1, "System Address, processor bus- PCI Bus ID: %s %x:%x\n", 975 edac_dbg(1, "System Address, processor bus- PCI Bus ID: %s %x:%x\n",
974 pci_name(pvt->pci_dev_16_0_fsb_ctlr), 976 pci_name(pvt->pci_dev_16_0_fsb_ctlr),
975 pvt->pci_dev_16_0_fsb_ctlr->vendor, 977 pvt->pci_dev_16_0_fsb_ctlr->vendor,