Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/eeh: Do probe on pci_dn

Originally, EEH core probes on device_node or pci_dev to populate
EEH devices and PEs, which conflicts with the fact: SRIOV VFs are
usually enabled and created by PF's driver and they don't have the
corresponding device_nodes. Instead, SRIOV VFs have dynamically
created pci_dn, which can be used for EEH probe.

The patch reworks EEH probe for PowerNV and pSeries platforms to
do probing based on pci_dn, instead of pci_dev or device_node any
more.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Gavin Shan and committed by
Benjamin Herrenschmidt
ff57b454 e8e9b34c

+172 -138
+5 -6
arch/powerpc/include/asm/eeh.h
··· 207 207 char *name; 208 208 int (*init)(void); 209 209 int (*post_init)(void); 210 - void* (*of_probe)(struct device_node *dn, void *flag); 211 - int (*dev_probe)(struct pci_dev *dev, void *flag); 210 + void* (*probe)(struct pci_dn *pdn, void *data); 212 211 int (*set_option)(struct eeh_pe *pe, int option); 213 212 int (*get_pe_addr)(struct eeh_pe *pe); 214 213 int (*get_state)(struct eeh_pe *pe, int *state); ··· 286 287 int eeh_check_failure(const volatile void __iomem *token); 287 288 int eeh_dev_check_failure(struct eeh_dev *edev); 288 289 void eeh_addr_cache_build(void); 289 - void eeh_add_device_early(struct device_node *); 290 - void eeh_add_device_tree_early(struct device_node *); 290 + void eeh_add_device_early(struct pci_dn *); 291 + void eeh_add_device_tree_early(struct pci_dn *); 291 292 void eeh_add_device_late(struct pci_dev *); 292 293 void eeh_add_device_tree_late(struct pci_bus *); 293 294 void eeh_add_sysfs_files(struct pci_bus *); ··· 345 346 346 347 static inline void eeh_addr_cache_build(void) { } 347 348 348 - static inline void eeh_add_device_early(struct device_node *dn) { } 349 + static inline void eeh_add_device_early(struct pci_dn *pdn) { } 349 350 350 - static inline void eeh_add_device_tree_early(struct device_node *dn) { } 351 + static inline void eeh_add_device_tree_early(struct pci_dn *pdn) { } 351 352 352 353 static inline void eeh_add_device_late(struct pci_dev *dev) { } 353 354
+21 -42
arch/powerpc/kernel/eeh.c
··· 969 969 int eeh_init(void) 970 970 { 971 971 struct pci_controller *hose, *tmp; 972 - struct device_node *phb; 972 + struct pci_dn *pdn; 973 973 static int cnt = 0; 974 974 int ret = 0; 975 975 ··· 1004 1004 return ret; 1005 1005 1006 1006 /* Enable EEH for all adapters */ 1007 - if (eeh_has_flag(EEH_PROBE_MODE_DEVTREE)) { 1008 - list_for_each_entry_safe(hose, tmp, 1009 - &hose_list, list_node) { 1010 - phb = hose->dn; 1011 - traverse_pci_devices(phb, eeh_ops->of_probe, NULL); 1012 - } 1013 - } else if (eeh_has_flag(EEH_PROBE_MODE_DEV)) { 1014 - list_for_each_entry_safe(hose, tmp, 1015 - &hose_list, list_node) 1016 - pci_walk_bus(hose->bus, eeh_ops->dev_probe, NULL); 1017 - } else { 1018 - pr_warn("%s: Invalid probe mode %x", 1019 - __func__, eeh_subsystem_flags); 1020 - return -EINVAL; 1007 + list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { 1008 + pdn = hose->pci_data; 1009 + traverse_pci_dn(pdn, eeh_ops->probe, NULL); 1021 1010 } 1022 1011 1023 1012 /* ··· 1032 1043 1033 1044 /** 1034 1045 * eeh_add_device_early - Enable EEH for the indicated device_node 1035 - * @dn: device node for which to set up EEH 1046 + * @pdn: PCI device node for which to set up EEH 1036 1047 * 1037 1048 * This routine must be used to perform EEH initialization for PCI 1038 1049 * devices that were added after system boot (e.g. hotplug, dlpar). ··· 1042 1053 * on the CEC architecture, type of the device, on earlier boot 1043 1054 * command-line arguments & etc. 1044 1055 */ 1045 - void eeh_add_device_early(struct device_node *dn) 1056 + void eeh_add_device_early(struct pci_dn *pdn) 1046 1057 { 1047 1058 struct pci_controller *phb; 1059 + struct eeh_dev *edev = pdn_to_eeh_dev(pdn); 1048 1060 1049 - /* 1050 - * If we're doing EEH probe based on PCI device, we 1051 - * would delay the probe until late stage because 1052 - * the PCI device isn't available this moment. 1053 - */ 1054 - if (!eeh_has_flag(EEH_PROBE_MODE_DEVTREE)) 1061 + if (!edev) 1055 1062 return; 1056 - 1057 - if (!of_node_to_eeh_dev(dn)) 1058 - return; 1059 - phb = of_node_to_eeh_dev(dn)->phb; 1060 1063 1061 1064 /* USB Bus children of PCI devices will not have BUID's */ 1062 - if (NULL == phb || 0 == phb->buid) 1065 + phb = edev->phb; 1066 + if (NULL == phb || 1067 + (eeh_has_flag(EEH_PROBE_MODE_DEVTREE) && 0 == phb->buid)) 1063 1068 return; 1064 1069 1065 - eeh_ops->of_probe(dn, NULL); 1070 + eeh_ops->probe(pdn, NULL); 1066 1071 } 1067 1072 1068 1073 /** 1069 1074 * eeh_add_device_tree_early - Enable EEH for the indicated device 1070 - * @dn: device node 1075 + * @pdn: PCI device node 1071 1076 * 1072 1077 * This routine must be used to perform EEH initialization for the 1073 1078 * indicated PCI device that was added after system boot (e.g. 1074 1079 * hotplug, dlpar). 1075 1080 */ 1076 - void eeh_add_device_tree_early(struct device_node *dn) 1081 + void eeh_add_device_tree_early(struct pci_dn *pdn) 1077 1082 { 1078 - struct device_node *sib; 1083 + struct pci_dn *n; 1079 1084 1080 - for_each_child_of_node(dn, sib) 1081 - eeh_add_device_tree_early(sib); 1082 - eeh_add_device_early(dn); 1085 + if (!pdn) 1086 + return; 1087 + 1088 + list_for_each_entry(n, &pdn->child_list, list) 1089 + eeh_add_device_tree_early(n); 1090 + eeh_add_device_early(pdn); 1083 1091 } 1084 1092 EXPORT_SYMBOL_GPL(eeh_add_device_tree_early); 1085 1093 ··· 1129 1143 1130 1144 edev->pdev = dev; 1131 1145 dev->dev.archdata.edev = edev; 1132 - 1133 - /* 1134 - * We have to do the EEH probe here because the PCI device 1135 - * hasn't been created yet in the early stage. 1136 - */ 1137 - if (eeh_has_flag(EEH_PROBE_MODE_DEV)) 1138 - eeh_ops->dev_probe(dev, NULL); 1139 1146 1140 1147 eeh_addr_cache_insert_dev(dev); 1141 1148 }
+1 -1
arch/powerpc/kernel/of_platform.c
··· 72 72 73 73 /* Register devices with EEH */ 74 74 if (dev->dev.of_node->child) 75 - eeh_add_device_tree_early(dev->dev.of_node); 75 + eeh_add_device_tree_early(PCI_DN(dev->dev.of_node)); 76 76 77 77 /* Scan the bus */ 78 78 pcibios_scan_phb(phb);
+1 -1
arch/powerpc/kernel/pci-hotplug.c
··· 75 75 struct pci_dev *dev; 76 76 struct device_node *dn = pci_bus_to_OF_node(bus); 77 77 78 - eeh_add_device_tree_early(dn); 78 + eeh_add_device_tree_early(PCI_DN(dn)); 79 79 80 80 mode = PCI_PROBE_NORMAL; 81 81 if (ppc_md.pci_probe_mode)
+111 -35
arch/powerpc/platforms/powernv/eeh-powernv.c
··· 286 286 return ret; 287 287 } 288 288 289 + static int pnv_eeh_cap_start(struct pci_dn *pdn) 290 + { 291 + u32 status; 292 + 293 + if (!pdn) 294 + return 0; 295 + 296 + pnv_pci_cfg_read(pdn, PCI_STATUS, 2, &status); 297 + if (!(status & PCI_STATUS_CAP_LIST)) 298 + return 0; 299 + 300 + return PCI_CAPABILITY_LIST; 301 + } 302 + 303 + static int pnv_eeh_find_cap(struct pci_dn *pdn, int cap) 304 + { 305 + int pos = pnv_eeh_cap_start(pdn); 306 + int cnt = 48; /* Maximal number of capabilities */ 307 + u32 id; 308 + 309 + if (!pos) 310 + return 0; 311 + 312 + while (cnt--) { 313 + pnv_pci_cfg_read(pdn, pos, 1, &pos); 314 + if (pos < 0x40) 315 + break; 316 + 317 + pos &= ~3; 318 + pnv_pci_cfg_read(pdn, pos + PCI_CAP_LIST_ID, 1, &id); 319 + if (id == 0xff) 320 + break; 321 + 322 + /* Found */ 323 + if (id == cap) 324 + return pos; 325 + 326 + /* Next one */ 327 + pos += PCI_CAP_LIST_NEXT; 328 + } 329 + 330 + return 0; 331 + } 332 + 333 + static int pnv_eeh_find_ecap(struct pci_dn *pdn, int cap) 334 + { 335 + struct eeh_dev *edev = pdn_to_eeh_dev(pdn); 336 + u32 header; 337 + int pos = 256, ttl = (4096 - 256) / 8; 338 + 339 + if (!edev || !edev->pcie_cap) 340 + return 0; 341 + if (pnv_pci_cfg_read(pdn, pos, 4, &header) != PCIBIOS_SUCCESSFUL) 342 + return 0; 343 + else if (!header) 344 + return 0; 345 + 346 + while (ttl-- > 0) { 347 + if (PCI_EXT_CAP_ID(header) == cap && pos) 348 + return pos; 349 + 350 + pos = PCI_EXT_CAP_NEXT(header); 351 + if (pos < 256) 352 + break; 353 + 354 + if (pnv_pci_cfg_read(pdn, pos, 4, &header) != PCIBIOS_SUCCESSFUL) 355 + break; 356 + } 357 + 358 + return 0; 359 + } 360 + 289 361 /** 290 - * pnv_eeh_dev_probe - Do probe on PCI device 291 - * @dev: PCI device 292 - * @flag: unused 362 + * pnv_eeh_probe - Do probe on PCI device 363 + * @pdn: PCI device node 364 + * @data: unused 293 365 * 294 366 * When EEH module is installed during system boot, all PCI devices 295 367 * are checked one by one to see if it supports EEH. The function ··· 375 303 * was possiblly triggered by EEH core, the binding between EEH device 376 304 * and the PCI device isn't built yet. 377 305 */ 378 - static int pnv_eeh_dev_probe(struct pci_dev *dev, void *flag) 306 + static void *pnv_eeh_probe(struct pci_dn *pdn, void *data) 379 307 { 380 - struct pci_controller *hose = pci_bus_to_host(dev->bus); 308 + struct pci_controller *hose = pdn->phb; 381 309 struct pnv_phb *phb = hose->private_data; 382 - struct device_node *dn = pci_device_to_OF_node(dev); 383 - struct eeh_dev *edev = of_node_to_eeh_dev(dn); 310 + struct eeh_dev *edev = pdn_to_eeh_dev(pdn); 311 + uint32_t pcie_flags; 384 312 int ret; 385 313 386 314 /* ··· 389 317 * the root bridge. So it's not reasonable to continue 390 318 * the probing. 391 319 */ 392 - if (!dn || !edev || edev->pe) 393 - return 0; 320 + if (!edev || edev->pe) 321 + return NULL; 394 322 395 323 /* Skip for PCI-ISA bridge */ 396 - if ((dev->class >> 8) == PCI_CLASS_BRIDGE_ISA) 397 - return 0; 324 + if ((pdn->class_code >> 8) == PCI_CLASS_BRIDGE_ISA) 325 + return NULL; 398 326 399 327 /* Initialize eeh device */ 400 - edev->class_code = dev->class; 328 + edev->class_code = pdn->class_code; 401 329 edev->mode &= 0xFFFFFF00; 402 - if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) 330 + edev->pcix_cap = pnv_eeh_find_cap(pdn, PCI_CAP_ID_PCIX); 331 + edev->pcie_cap = pnv_eeh_find_cap(pdn, PCI_CAP_ID_EXP); 332 + edev->aer_cap = pnv_eeh_find_ecap(pdn, PCI_EXT_CAP_ID_ERR); 333 + if ((edev->class_code >> 8) == PCI_CLASS_BRIDGE_PCI) { 403 334 edev->mode |= EEH_DEV_BRIDGE; 404 - edev->pcix_cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); 405 - if (pci_is_pcie(dev)) { 406 - edev->pcie_cap = pci_pcie_cap(dev); 407 - 408 - if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT) 409 - edev->mode |= EEH_DEV_ROOT_PORT; 410 - else if (pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM) 411 - edev->mode |= EEH_DEV_DS_PORT; 412 - 413 - edev->aer_cap = pci_find_ext_capability(dev, 414 - PCI_EXT_CAP_ID_ERR); 335 + if (edev->pcie_cap) { 336 + pnv_pci_cfg_read(pdn, edev->pcie_cap + PCI_EXP_FLAGS, 337 + 2, &pcie_flags); 338 + pcie_flags = (pcie_flags & PCI_EXP_FLAGS_TYPE) >> 4; 339 + if (pcie_flags == PCI_EXP_TYPE_ROOT_PORT) 340 + edev->mode |= EEH_DEV_ROOT_PORT; 341 + else if (pcie_flags == PCI_EXP_TYPE_DOWNSTREAM) 342 + edev->mode |= EEH_DEV_DS_PORT; 343 + } 415 344 } 416 345 417 - edev->config_addr = ((dev->bus->number << 8) | dev->devfn); 418 - edev->pe_config_addr = phb->bdfn_to_pe(phb, dev->bus, dev->devfn & 0xff); 346 + edev->config_addr = (pdn->busno << 8) | (pdn->devfn); 347 + edev->pe_config_addr = phb->ioda.pe_rmap[edev->config_addr]; 419 348 420 349 /* Create PE */ 421 350 ret = eeh_add_to_parent_pe(edev); 422 351 if (ret) { 423 - pr_warn("%s: Can't add PCI dev %s to parent PE (%d)\n", 424 - __func__, pci_name(dev), ret); 425 - return ret; 352 + pr_warn("%s: Can't add PCI dev %04x:%02x:%02x.%01x to parent PE (%d)\n", 353 + __func__, hose->global_number, pdn->busno, 354 + PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn), ret); 355 + return NULL; 426 356 } 427 357 428 358 /* ··· 443 369 * Broadcom Austin 4-ports NICs (14e4:1657) 444 370 * Broadcom Shiner 2-ports 10G NICs (14e4:168e) 445 371 */ 446 - if ((dev->vendor == PCI_VENDOR_ID_BROADCOM && dev->device == 0x1657) || 447 - (dev->vendor == PCI_VENDOR_ID_BROADCOM && dev->device == 0x168e)) 372 + if ((pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && 373 + pdn->device_id == 0x1657) || 374 + (pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && 375 + pdn->device_id == 0x168e)) 448 376 edev->pe->state |= EEH_PE_CFG_RESTRICTED; 449 377 450 378 /* ··· 456 380 * to PE reset. 457 381 */ 458 382 if (!edev->pe->bus) 459 - edev->pe->bus = dev->bus; 383 + edev->pe->bus = pci_find_bus(hose->global_number, 384 + pdn->busno); 460 385 461 386 /* 462 387 * Enable EEH explicitly so that we will do EEH check ··· 468 391 /* Save memory bars */ 469 392 eeh_save_bars(edev); 470 393 471 - return 0; 394 + return NULL; 472 395 } 473 396 474 397 /** ··· 1509 1432 .name = "powernv", 1510 1433 .init = pnv_eeh_init, 1511 1434 .post_init = pnv_eeh_post_init, 1512 - .of_probe = NULL, 1513 - .dev_probe = pnv_eeh_dev_probe, 1435 + .probe = pnv_eeh_probe, 1514 1436 .set_option = pnv_eeh_set_option, 1515 1437 .get_pe_addr = pnv_eeh_get_pe_addr, 1516 1438 .get_state = pnv_eeh_get_state,
+31 -51
arch/powerpc/platforms/pseries/eeh_pseries.c
··· 118 118 return 0; 119 119 } 120 120 121 - static int pseries_eeh_cap_start(struct device_node *dn) 121 + static int pseries_eeh_cap_start(struct pci_dn *pdn) 122 122 { 123 - struct pci_dn *pdn = PCI_DN(dn); 124 123 u32 status; 125 124 126 125 if (!pdn) ··· 133 134 } 134 135 135 136 136 - static int pseries_eeh_find_cap(struct device_node *dn, int cap) 137 + static int pseries_eeh_find_cap(struct pci_dn *pdn, int cap) 137 138 { 138 - struct pci_dn *pdn = PCI_DN(dn); 139 - int pos = pseries_eeh_cap_start(dn); 139 + int pos = pseries_eeh_cap_start(pdn); 140 140 int cnt = 48; /* Maximal number of capabilities */ 141 141 u32 id; 142 142 ··· 158 160 return 0; 159 161 } 160 162 161 - static int pseries_eeh_find_ecap(struct device_node *dn, int cap) 163 + static int pseries_eeh_find_ecap(struct pci_dn *pdn, int cap) 162 164 { 163 - struct pci_dn *pdn = PCI_DN(dn); 164 - struct eeh_dev *edev = of_node_to_eeh_dev(dn); 165 + struct eeh_dev *edev = pdn_to_eeh_dev(pdn); 165 166 u32 header; 166 167 int pos = 256; 167 168 int ttl = (4096 - 256) / 8; ··· 188 191 } 189 192 190 193 /** 191 - * pseries_eeh_of_probe - EEH probe on the given device 192 - * @dn: OF node 193 - * @flag: Unused 194 + * pseries_eeh_probe - EEH probe on the given device 195 + * @pdn: PCI device node 196 + * @data: Unused 194 197 * 195 198 * When EEH module is installed during system boot, all PCI devices 196 199 * are checked one by one to see if it supports EEH. The function 197 200 * is introduced for the purpose. 198 201 */ 199 - static void *pseries_eeh_of_probe(struct device_node *dn, void *flag) 202 + static void *pseries_eeh_probe(struct pci_dn *pdn, void *data) 200 203 { 201 204 struct eeh_dev *edev; 202 205 struct eeh_pe pe; 203 - struct pci_dn *pdn = PCI_DN(dn); 204 - const __be32 *classp, *vendorp, *devicep; 205 - u32 class_code; 206 - const __be32 *regs; 207 206 u32 pcie_flags; 208 207 int enable = 0; 209 208 int ret; 210 209 211 210 /* Retrieve OF node and eeh device */ 212 - edev = of_node_to_eeh_dev(dn); 213 - if (edev->pe || !of_device_is_available(dn)) 211 + edev = pdn_to_eeh_dev(pdn); 212 + if (!edev || edev->pe) 214 213 return NULL; 215 214 216 - /* Retrieve class/vendor/device IDs */ 217 - classp = of_get_property(dn, "class-code", NULL); 218 - vendorp = of_get_property(dn, "vendor-id", NULL); 219 - devicep = of_get_property(dn, "device-id", NULL); 220 - 221 - /* Skip for bad OF node or PCI-ISA bridge */ 222 - if (!classp || !vendorp || !devicep) 223 - return NULL; 224 - if (dn->type && !strcmp(dn->type, "isa")) 215 + /* Check class/vendor/device IDs */ 216 + if (!pdn->vendor_id || !pdn->device_id || !pdn->class_code) 225 217 return NULL; 226 218 227 - class_code = of_read_number(classp, 1); 219 + /* Skip for PCI-ISA bridge */ 220 + if ((pdn->class_code >> 8) == PCI_CLASS_BRIDGE_ISA) 221 + return NULL; 228 222 229 223 /* 230 224 * Update class code and mode of eeh device. We need 231 225 * correctly reflects that current device is root port 232 226 * or PCIe switch downstream port. 233 227 */ 234 - edev->class_code = class_code; 235 - edev->pcix_cap = pseries_eeh_find_cap(dn, PCI_CAP_ID_PCIX); 236 - edev->pcie_cap = pseries_eeh_find_cap(dn, PCI_CAP_ID_EXP); 237 - edev->aer_cap = pseries_eeh_find_ecap(dn, PCI_EXT_CAP_ID_ERR); 228 + edev->class_code = pdn->class_code; 229 + edev->pcix_cap = pseries_eeh_find_cap(pdn, PCI_CAP_ID_PCIX); 230 + edev->pcie_cap = pseries_eeh_find_cap(pdn, PCI_CAP_ID_EXP); 231 + edev->aer_cap = pseries_eeh_find_ecap(pdn, PCI_EXT_CAP_ID_ERR); 238 232 edev->mode &= 0xFFFFFF00; 239 233 if ((edev->class_code >> 8) == PCI_CLASS_BRIDGE_PCI) { 240 234 edev->mode |= EEH_DEV_BRIDGE; ··· 240 252 } 241 253 } 242 254 243 - /* Retrieve the device address */ 244 - regs = of_get_property(dn, "reg", NULL); 245 - if (!regs) { 246 - pr_warn("%s: OF node property %s::reg not found\n", 247 - __func__, dn->full_name); 248 - return NULL; 249 - } 250 - 251 255 /* Initialize the fake PE */ 252 256 memset(&pe, 0, sizeof(struct eeh_pe)); 253 257 pe.phb = edev->phb; 254 - pe.config_addr = of_read_number(regs, 1); 258 + pe.config_addr = (pdn->busno << 16) | (pdn->devfn << 8); 255 259 256 260 /* Enable EEH on the device */ 257 261 ret = eeh_ops->set_option(&pe, EEH_OPT_ENABLE); 258 262 if (!ret) { 259 - edev->config_addr = of_read_number(regs, 1); 260 263 /* Retrieve PE address */ 264 + edev->config_addr = (pdn->busno << 16) | (pdn->devfn << 8); 261 265 edev->pe_config_addr = eeh_ops->get_pe_addr(&pe); 262 266 pe.addr = edev->pe_config_addr; 263 267 ··· 265 285 eeh_add_flag(EEH_ENABLED); 266 286 eeh_add_to_parent_pe(edev); 267 287 268 - pr_debug("%s: EEH enabled on %s PHB#%d-PE#%x, config addr#%x\n", 269 - __func__, dn->full_name, pe.phb->global_number, 270 - pe.addr, pe.config_addr); 271 - } else if (dn->parent && of_node_to_eeh_dev(dn->parent) && 272 - (of_node_to_eeh_dev(dn->parent))->pe) { 288 + pr_debug("%s: EEH enabled on %02x:%02x.%01x PHB#%d-PE#%x\n", 289 + __func__, pdn->busno, PCI_SLOT(pdn->devfn), 290 + PCI_FUNC(pdn->devfn), pe.phb->global_number, 291 + pe.addr); 292 + } else if (pdn->parent && pdn_to_eeh_dev(pdn->parent) && 293 + (pdn_to_eeh_dev(pdn->parent))->pe) { 273 294 /* This device doesn't support EEH, but it may have an 274 295 * EEH parent, in which case we mark it as supported. 275 296 */ 276 - edev->config_addr = of_node_to_eeh_dev(dn->parent)->config_addr; 277 - edev->pe_config_addr = of_node_to_eeh_dev(dn->parent)->pe_config_addr; 297 + edev->config_addr = pdn_to_eeh_dev(pdn->parent)->config_addr; 298 + edev->pe_config_addr = pdn_to_eeh_dev(pdn->parent)->pe_config_addr; 278 299 eeh_add_to_parent_pe(edev); 279 300 } 280 301 } ··· 688 707 static struct eeh_ops pseries_eeh_ops = { 689 708 .name = "pseries", 690 709 .init = pseries_eeh_init, 691 - .of_probe = pseries_eeh_of_probe, 692 - .dev_probe = NULL, 710 + .probe = pseries_eeh_probe, 693 711 .set_option = pseries_eeh_set_option, 694 712 .get_pe_addr = pseries_eeh_get_pe_addr, 695 713 .get_state = pseries_eeh_get_state,
+1 -1
arch/powerpc/platforms/pseries/pci_dlpar.c
··· 82 82 eeh_dev_phb_init_dynamic(phb); 83 83 84 84 if (dn->child) 85 - eeh_add_device_tree_early(dn); 85 + eeh_add_device_tree_early(PCI_DN(dn)); 86 86 87 87 pcibios_scan_phb(phb); 88 88 pcibios_finish_adding_to_bus(phb->bus);
+1 -1
drivers/pci/hotplug/rpadlpar_core.c
··· 146 146 struct pci_controller *phb = pdn->phb; 147 147 struct pci_dev *dev = NULL; 148 148 149 - eeh_add_device_tree_early(dn); 149 + eeh_add_device_tree_early(pdn); 150 150 151 151 /* Add EADS device to PHB bus, adding new entry to bus->devices */ 152 152 dev = of_create_pci_dev(dn, phb->bus, pdn->devfn);