aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2012-09-07 18:44:14 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-09 19:35:41 -0400
commit371a395d2f1fe296c89735547672d70f4dcc2949 (patch)
tree91bd90e0045a97526b9e7e145c11233f378735fb /arch/powerpc
parent66523d9f2d799de901a5ae7bbed6c3f663fb0b00 (diff)
powerpc/eeh: Make EEH operations based on PE
Originally, all the EEH operations were implemented based on OF node. Actually, it explicitly breaks the rules that the operation target is PE instead of device. Therefore, the patch makes all the operations based on PE instead of device. Unfortunately, the backend for config space has to be kept as original because it doesn't depend on PE. Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/eeh.h14
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c13
-rw-r--r--arch/powerpc/platforms/pseries/eeh_pseries.c133
3 files changed, 74 insertions, 86 deletions
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index f86a85f5f049..5e45a1c5c9e8 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -136,13 +136,13 @@ static inline struct pci_dev *eeh_dev_to_pci_dev(struct eeh_dev *edev)
136struct eeh_ops { 136struct eeh_ops {
137 char *name; 137 char *name;
138 int (*init)(void); 138 int (*init)(void);
139 int (*set_option)(struct device_node *dn, int option); 139 int (*set_option)(struct eeh_pe *pe, int option);
140 int (*get_pe_addr)(struct device_node *dn); 140 int (*get_pe_addr)(struct eeh_pe *pe);
141 int (*get_state)(struct device_node *dn, int *state); 141 int (*get_state)(struct eeh_pe *pe, int *state);
142 int (*reset)(struct device_node *dn, int option); 142 int (*reset)(struct eeh_pe *pe, int option);
143 int (*wait_state)(struct device_node *dn, int max_wait); 143 int (*wait_state)(struct eeh_pe *pe, int max_wait);
144 int (*get_log)(struct device_node *dn, int severity, char *drv_log, unsigned long len); 144 int (*get_log)(struct eeh_pe *pe, int severity, char *drv_log, unsigned long len);
145 int (*configure_bridge)(struct device_node *dn); 145 int (*configure_bridge)(struct eeh_pe *pe);
146 int (*read_config)(struct device_node *dn, int where, int size, u32 *val); 146 int (*read_config)(struct device_node *dn, int where, int size, u32 *val);
147 int (*write_config)(struct device_node *dn, int where, int size, u32 val); 147 int (*write_config)(struct device_node *dn, int where, int size, u32 val);
148}; 148};
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index f210160c1fdb..3c8658ea13f2 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -729,6 +729,7 @@ static void *eeh_early_enable(struct device_node *dn, void *data)
729 const u32 *regs; 729 const u32 *regs;
730 int enable; 730 int enable;
731 struct eeh_dev *edev = of_node_to_eeh_dev(dn); 731 struct eeh_dev *edev = of_node_to_eeh_dev(dn);
732 struct eeh_pe pe;
732 733
733 edev->class_code = 0; 734 edev->class_code = 0;
734 edev->mode = 0; 735 edev->mode = 0;
@@ -755,9 +756,14 @@ static void *eeh_early_enable(struct device_node *dn, void *data)
755 */ 756 */
756 regs = of_get_property(dn, "reg", NULL); 757 regs = of_get_property(dn, "reg", NULL);
757 if (regs) { 758 if (regs) {
759 /* Initialize the fake PE */
760 memset(&pe, 0, sizeof(struct eeh_pe));
761 pe.phb = edev->phb;
762 pe.config_addr = regs[0];
763
758 /* First register entry is addr (00BBSS00) */ 764 /* First register entry is addr (00BBSS00) */
759 /* Try to enable eeh */ 765 /* Try to enable eeh */
760 ret = eeh_ops->set_option(dn, EEH_OPT_ENABLE); 766 ret = eeh_ops->set_option(&pe, EEH_OPT_ENABLE);
761 767
762 enable = 0; 768 enable = 0;
763 if (ret == 0) { 769 if (ret == 0) {
@@ -766,14 +772,15 @@ static void *eeh_early_enable(struct device_node *dn, void *data)
766 /* If the newer, better, ibm,get-config-addr-info is supported, 772 /* If the newer, better, ibm,get-config-addr-info is supported,
767 * then use that instead. 773 * then use that instead.
768 */ 774 */
769 edev->pe_config_addr = eeh_ops->get_pe_addr(dn); 775 edev->pe_config_addr = eeh_ops->get_pe_addr(&pe);
776 pe.addr = edev->pe_config_addr;
770 777
771 /* Some older systems (Power4) allow the 778 /* Some older systems (Power4) allow the
772 * ibm,set-eeh-option call to succeed even on nodes 779 * ibm,set-eeh-option call to succeed even on nodes
773 * where EEH is not supported. Verify support 780 * where EEH is not supported. Verify support
774 * explicitly. 781 * explicitly.
775 */ 782 */
776 ret = eeh_ops->get_state(dn, NULL); 783 ret = eeh_ops->get_state(&pe, NULL);
777 if (ret > 0 && ret != EEH_STATE_NOT_SUPPORT) 784 if (ret > 0 && ret != EEH_STATE_NOT_SUPPORT)
778 enable = 1; 785 enable = 1;
779 } 786 }
diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
index cf6d6cc0be80..fdeef772d714 100644
--- a/arch/powerpc/platforms/pseries/eeh_pseries.c
+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
@@ -134,22 +134,18 @@ static int pseries_eeh_init(void)
134 134
135/** 135/**
136 * pseries_eeh_set_option - Initialize EEH or MMIO/DMA reenable 136 * pseries_eeh_set_option - Initialize EEH or MMIO/DMA reenable
137 * @dn: device node 137 * @pe: EEH PE
138 * @option: operation to be issued 138 * @option: operation to be issued
139 * 139 *
140 * The function is used to control the EEH functionality globally. 140 * The function is used to control the EEH functionality globally.
141 * Currently, following options are support according to PAPR: 141 * Currently, following options are support according to PAPR:
142 * Enable EEH, Disable EEH, Enable MMIO and Enable DMA 142 * Enable EEH, Disable EEH, Enable MMIO and Enable DMA
143 */ 143 */
144static int pseries_eeh_set_option(struct device_node *dn, int option) 144static int pseries_eeh_set_option(struct eeh_pe *pe, int option)
145{ 145{
146 int ret = 0; 146 int ret = 0;
147 struct eeh_dev *edev;
148 const u32 *reg;
149 int config_addr; 147 int config_addr;
150 148
151 edev = of_node_to_eeh_dev(dn);
152
153 /* 149 /*
154 * When we're enabling or disabling EEH functioality on 150 * When we're enabling or disabling EEH functioality on
155 * the particular PE, the PE config address is possibly 151 * the particular PE, the PE config address is possibly
@@ -159,15 +155,11 @@ static int pseries_eeh_set_option(struct device_node *dn, int option)
159 switch (option) { 155 switch (option) {
160 case EEH_OPT_DISABLE: 156 case EEH_OPT_DISABLE:
161 case EEH_OPT_ENABLE: 157 case EEH_OPT_ENABLE:
162 reg = of_get_property(dn, "reg", NULL);
163 config_addr = reg[0];
164 break;
165
166 case EEH_OPT_THAW_MMIO: 158 case EEH_OPT_THAW_MMIO:
167 case EEH_OPT_THAW_DMA: 159 case EEH_OPT_THAW_DMA:
168 config_addr = edev->config_addr; 160 config_addr = pe->config_addr;
169 if (edev->pe_config_addr) 161 if (pe->addr)
170 config_addr = edev->pe_config_addr; 162 config_addr = pe->addr;
171 break; 163 break;
172 164
173 default: 165 default:
@@ -177,15 +169,15 @@ static int pseries_eeh_set_option(struct device_node *dn, int option)
177 } 169 }
178 170
179 ret = rtas_call(ibm_set_eeh_option, 4, 1, NULL, 171 ret = rtas_call(ibm_set_eeh_option, 4, 1, NULL,
180 config_addr, BUID_HI(edev->phb->buid), 172 config_addr, BUID_HI(pe->phb->buid),
181 BUID_LO(edev->phb->buid), option); 173 BUID_LO(pe->phb->buid), option);
182 174
183 return ret; 175 return ret;
184} 176}
185 177
186/** 178/**
187 * pseries_eeh_get_pe_addr - Retrieve PE address 179 * pseries_eeh_get_pe_addr - Retrieve PE address
188 * @dn: device node 180 * @pe: EEH PE
189 * 181 *
190 * Retrieve the assocated PE address. Actually, there're 2 RTAS 182 * Retrieve the assocated PE address. Actually, there're 2 RTAS
191 * function calls dedicated for the purpose. We need implement 183 * function calls dedicated for the purpose. We need implement
@@ -196,14 +188,11 @@ static int pseries_eeh_set_option(struct device_node *dn, int option)
196 * It's notable that zero'ed return value means invalid PE config 188 * It's notable that zero'ed return value means invalid PE config
197 * address. 189 * address.
198 */ 190 */
199static int pseries_eeh_get_pe_addr(struct device_node *dn) 191static int pseries_eeh_get_pe_addr(struct eeh_pe *pe)
200{ 192{
201 struct eeh_dev *edev;
202 int ret = 0; 193 int ret = 0;
203 int rets[3]; 194 int rets[3];
204 195
205 edev = of_node_to_eeh_dev(dn);
206
207 if (ibm_get_config_addr_info2 != RTAS_UNKNOWN_SERVICE) { 196 if (ibm_get_config_addr_info2 != RTAS_UNKNOWN_SERVICE) {
208 /* 197 /*
209 * First of all, we need to make sure there has one PE 198 * First of all, we need to make sure there has one PE
@@ -211,18 +200,18 @@ static int pseries_eeh_get_pe_addr(struct device_node *dn)
211 * meaningless. 200 * meaningless.
212 */ 201 */
213 ret = rtas_call(ibm_get_config_addr_info2, 4, 2, rets, 202 ret = rtas_call(ibm_get_config_addr_info2, 4, 2, rets,
214 edev->config_addr, BUID_HI(edev->phb->buid), 203 pe->config_addr, BUID_HI(pe->phb->buid),
215 BUID_LO(edev->phb->buid), 1); 204 BUID_LO(pe->phb->buid), 1);
216 if (ret || (rets[0] == 0)) 205 if (ret || (rets[0] == 0))
217 return 0; 206 return 0;
218 207
219 /* Retrieve the associated PE config address */ 208 /* Retrieve the associated PE config address */
220 ret = rtas_call(ibm_get_config_addr_info2, 4, 2, rets, 209 ret = rtas_call(ibm_get_config_addr_info2, 4, 2, rets,
221 edev->config_addr, BUID_HI(edev->phb->buid), 210 pe->config_addr, BUID_HI(pe->phb->buid),
222 BUID_LO(edev->phb->buid), 0); 211 BUID_LO(pe->phb->buid), 0);
223 if (ret) { 212 if (ret) {
224 pr_warning("%s: Failed to get PE address for %s\n", 213 pr_warning("%s: Failed to get address for PHB#%d-PE#%x\n",
225 __func__, dn->full_name); 214 __func__, pe->phb->global_number, pe->config_addr);
226 return 0; 215 return 0;
227 } 216 }
228 217
@@ -231,11 +220,11 @@ static int pseries_eeh_get_pe_addr(struct device_node *dn)
231 220
232 if (ibm_get_config_addr_info != RTAS_UNKNOWN_SERVICE) { 221 if (ibm_get_config_addr_info != RTAS_UNKNOWN_SERVICE) {
233 ret = rtas_call(ibm_get_config_addr_info, 4, 2, rets, 222 ret = rtas_call(ibm_get_config_addr_info, 4, 2, rets,
234 edev->config_addr, BUID_HI(edev->phb->buid), 223 pe->config_addr, BUID_HI(pe->phb->buid),
235 BUID_LO(edev->phb->buid), 0); 224 BUID_LO(pe->phb->buid), 0);
236 if (ret) { 225 if (ret) {
237 pr_warning("%s: Failed to get PE address for %s\n", 226 pr_warning("%s: Failed to get address for PHB#%d-PE#%x\n",
238 __func__, dn->full_name); 227 __func__, pe->phb->global_number, pe->config_addr);
239 return 0; 228 return 0;
240 } 229 }
241 230
@@ -247,7 +236,7 @@ static int pseries_eeh_get_pe_addr(struct device_node *dn)
247 236
248/** 237/**
249 * pseries_eeh_get_state - Retrieve PE state 238 * pseries_eeh_get_state - Retrieve PE state
250 * @dn: PE associated device node 239 * @pe: EEH PE
251 * @state: return value 240 * @state: return value
252 * 241 *
253 * Retrieve the state of the specified PE. On RTAS compliant 242 * Retrieve the state of the specified PE. On RTAS compliant
@@ -258,30 +247,28 @@ static int pseries_eeh_get_pe_addr(struct device_node *dn)
258 * RTAS calls for the purpose, we need to try the new one and back 247 * RTAS calls for the purpose, we need to try the new one and back
259 * to the old one if the new one couldn't work properly. 248 * to the old one if the new one couldn't work properly.
260 */ 249 */
261static int pseries_eeh_get_state(struct device_node *dn, int *state) 250static int pseries_eeh_get_state(struct eeh_pe *pe, int *state)
262{ 251{
263 struct eeh_dev *edev;
264 int config_addr; 252 int config_addr;
265 int ret; 253 int ret;
266 int rets[4]; 254 int rets[4];
267 int result; 255 int result;
268 256
269 /* Figure out PE config address if possible */ 257 /* Figure out PE config address if possible */
270 edev = of_node_to_eeh_dev(dn); 258 config_addr = pe->config_addr;
271 config_addr = edev->config_addr; 259 if (pe->addr)
272 if (edev->pe_config_addr) 260 config_addr = pe->addr;
273 config_addr = edev->pe_config_addr;
274 261
275 if (ibm_read_slot_reset_state2 != RTAS_UNKNOWN_SERVICE) { 262 if (ibm_read_slot_reset_state2 != RTAS_UNKNOWN_SERVICE) {
276 ret = rtas_call(ibm_read_slot_reset_state2, 3, 4, rets, 263 ret = rtas_call(ibm_read_slot_reset_state2, 3, 4, rets,
277 config_addr, BUID_HI(edev->phb->buid), 264 config_addr, BUID_HI(pe->phb->buid),
278 BUID_LO(edev->phb->buid)); 265 BUID_LO(pe->phb->buid));
279 } else if (ibm_read_slot_reset_state != RTAS_UNKNOWN_SERVICE) { 266 } else if (ibm_read_slot_reset_state != RTAS_UNKNOWN_SERVICE) {
280 /* Fake PE unavailable info */ 267 /* Fake PE unavailable info */
281 rets[2] = 0; 268 rets[2] = 0;
282 ret = rtas_call(ibm_read_slot_reset_state, 3, 3, rets, 269 ret = rtas_call(ibm_read_slot_reset_state, 3, 3, rets,
283 config_addr, BUID_HI(edev->phb->buid), 270 config_addr, BUID_HI(pe->phb->buid),
284 BUID_LO(edev->phb->buid)); 271 BUID_LO(pe->phb->buid));
285 } else { 272 } else {
286 return EEH_STATE_NOT_SUPPORT; 273 return EEH_STATE_NOT_SUPPORT;
287 } 274 }
@@ -333,34 +320,32 @@ static int pseries_eeh_get_state(struct device_node *dn, int *state)
333 320
334/** 321/**
335 * pseries_eeh_reset - Reset the specified PE 322 * pseries_eeh_reset - Reset the specified PE
336 * @dn: PE associated device node 323 * @pe: EEH PE
337 * @option: reset option 324 * @option: reset option
338 * 325 *
339 * Reset the specified PE 326 * Reset the specified PE
340 */ 327 */
341static int pseries_eeh_reset(struct device_node *dn, int option) 328static int pseries_eeh_reset(struct eeh_pe *pe, int option)
342{ 329{
343 struct eeh_dev *edev;
344 int config_addr; 330 int config_addr;
345 int ret; 331 int ret;
346 332
347 /* Figure out PE address */ 333 /* Figure out PE address */
348 edev = of_node_to_eeh_dev(dn); 334 config_addr = pe->config_addr;
349 config_addr = edev->config_addr; 335 if (pe->addr)
350 if (edev->pe_config_addr) 336 config_addr = pe->addr;
351 config_addr = edev->pe_config_addr;
352 337
353 /* Reset PE through RTAS call */ 338 /* Reset PE through RTAS call */
354 ret = rtas_call(ibm_set_slot_reset, 4, 1, NULL, 339 ret = rtas_call(ibm_set_slot_reset, 4, 1, NULL,
355 config_addr, BUID_HI(edev->phb->buid), 340 config_addr, BUID_HI(pe->phb->buid),
356 BUID_LO(edev->phb->buid), option); 341 BUID_LO(pe->phb->buid), option);
357 342
358 /* If fundamental-reset not supported, try hot-reset */ 343 /* If fundamental-reset not supported, try hot-reset */
359 if (option == EEH_RESET_FUNDAMENTAL && 344 if (option == EEH_RESET_FUNDAMENTAL &&
360 ret == -8) { 345 ret == -8) {
361 ret = rtas_call(ibm_set_slot_reset, 4, 1, NULL, 346 ret = rtas_call(ibm_set_slot_reset, 4, 1, NULL,
362 config_addr, BUID_HI(edev->phb->buid), 347 config_addr, BUID_HI(pe->phb->buid),
363 BUID_LO(edev->phb->buid), EEH_RESET_HOT); 348 BUID_LO(pe->phb->buid), EEH_RESET_HOT);
364 } 349 }
365 350
366 return ret; 351 return ret;
@@ -368,13 +353,13 @@ static int pseries_eeh_reset(struct device_node *dn, int option)
368 353
369/** 354/**
370 * pseries_eeh_wait_state - Wait for PE state 355 * pseries_eeh_wait_state - Wait for PE state
371 * @dn: PE associated device node 356 * @pe: EEH PE
372 * @max_wait: maximal period in microsecond 357 * @max_wait: maximal period in microsecond
373 * 358 *
374 * Wait for the state of associated PE. It might take some time 359 * Wait for the state of associated PE. It might take some time
375 * to retrieve the PE's state. 360 * to retrieve the PE's state.
376 */ 361 */
377static int pseries_eeh_wait_state(struct device_node *dn, int max_wait) 362static int pseries_eeh_wait_state(struct eeh_pe *pe, int max_wait)
378{ 363{
379 int ret; 364 int ret;
380 int mwait; 365 int mwait;
@@ -391,7 +376,7 @@ static int pseries_eeh_wait_state(struct device_node *dn, int max_wait)
391#define EEH_STATE_MAX_WAIT_TIME (300 * 1000) 376#define EEH_STATE_MAX_WAIT_TIME (300 * 1000)
392 377
393 while (1) { 378 while (1) {
394 ret = pseries_eeh_get_state(dn, &mwait); 379 ret = pseries_eeh_get_state(pe, &mwait);
395 380
396 /* 381 /*
397 * If the PE's state is temporarily unavailable, 382 * If the PE's state is temporarily unavailable,
@@ -426,7 +411,7 @@ static int pseries_eeh_wait_state(struct device_node *dn, int max_wait)
426 411
427/** 412/**
428 * pseries_eeh_get_log - Retrieve error log 413 * pseries_eeh_get_log - Retrieve error log
429 * @dn: device node 414 * @pe: EEH PE
430 * @severity: temporary or permanent error log 415 * @severity: temporary or permanent error log
431 * @drv_log: driver log to be combined with retrieved error log 416 * @drv_log: driver log to be combined with retrieved error log
432 * @len: length of driver log 417 * @len: length of driver log
@@ -435,24 +420,22 @@ static int pseries_eeh_wait_state(struct device_node *dn, int max_wait)
435 * Actually, the error will be retrieved through the dedicated 420 * Actually, the error will be retrieved through the dedicated
436 * RTAS call. 421 * RTAS call.
437 */ 422 */
438static int pseries_eeh_get_log(struct device_node *dn, int severity, char *drv_log, unsigned long len) 423static int pseries_eeh_get_log(struct eeh_pe *pe, int severity, char *drv_log, unsigned long len)
439{ 424{
440 struct eeh_dev *edev;
441 int config_addr; 425 int config_addr;
442 unsigned long flags; 426 unsigned long flags;
443 int ret; 427 int ret;
444 428
445 edev = of_node_to_eeh_dev(dn);
446 spin_lock_irqsave(&slot_errbuf_lock, flags); 429 spin_lock_irqsave(&slot_errbuf_lock, flags);
447 memset(slot_errbuf, 0, eeh_error_buf_size); 430 memset(slot_errbuf, 0, eeh_error_buf_size);
448 431
449 /* Figure out the PE address */ 432 /* Figure out the PE address */
450 config_addr = edev->config_addr; 433 config_addr = pe->config_addr;
451 if (edev->pe_config_addr) 434 if (pe->addr)
452 config_addr = edev->pe_config_addr; 435 config_addr = pe->addr;
453 436
454 ret = rtas_call(ibm_slot_error_detail, 8, 1, NULL, config_addr, 437 ret = rtas_call(ibm_slot_error_detail, 8, 1, NULL, config_addr,
455 BUID_HI(edev->phb->buid), BUID_LO(edev->phb->buid), 438 BUID_HI(pe->phb->buid), BUID_LO(pe->phb->buid),
456 virt_to_phys(drv_log), len, 439 virt_to_phys(drv_log), len,
457 virt_to_phys(slot_errbuf), eeh_error_buf_size, 440 virt_to_phys(slot_errbuf), eeh_error_buf_size,
458 severity); 441 severity);
@@ -465,40 +448,38 @@ static int pseries_eeh_get_log(struct device_node *dn, int severity, char *drv_l
465 448
466/** 449/**
467 * pseries_eeh_configure_bridge - Configure PCI bridges in the indicated PE 450 * pseries_eeh_configure_bridge - Configure PCI bridges in the indicated PE
468 * @dn: PE associated device node 451 * @pe: EEH PE
469 * 452 *
470 * The function will be called to reconfigure the bridges included 453 * The function will be called to reconfigure the bridges included
471 * in the specified PE so that the mulfunctional PE would be recovered 454 * in the specified PE so that the mulfunctional PE would be recovered
472 * again. 455 * again.
473 */ 456 */
474static int pseries_eeh_configure_bridge(struct device_node *dn) 457static int pseries_eeh_configure_bridge(struct eeh_pe *pe)
475{ 458{
476 struct eeh_dev *edev;
477 int config_addr; 459 int config_addr;
478 int ret; 460 int ret;
479 461
480 /* Figure out the PE address */ 462 /* Figure out the PE address */
481 edev = of_node_to_eeh_dev(dn); 463 config_addr = pe->config_addr;
482 config_addr = edev->config_addr; 464 if (pe->addr)
483 if (edev->pe_config_addr) 465 config_addr = pe->addr;
484 config_addr = edev->pe_config_addr;
485 466
486 /* Use new configure-pe function, if supported */ 467 /* Use new configure-pe function, if supported */
487 if (ibm_configure_pe != RTAS_UNKNOWN_SERVICE) { 468 if (ibm_configure_pe != RTAS_UNKNOWN_SERVICE) {
488 ret = rtas_call(ibm_configure_pe, 3, 1, NULL, 469 ret = rtas_call(ibm_configure_pe, 3, 1, NULL,
489 config_addr, BUID_HI(edev->phb->buid), 470 config_addr, BUID_HI(pe->phb->buid),
490 BUID_LO(edev->phb->buid)); 471 BUID_LO(pe->phb->buid));
491 } else if (ibm_configure_bridge != RTAS_UNKNOWN_SERVICE) { 472 } else if (ibm_configure_bridge != RTAS_UNKNOWN_SERVICE) {
492 ret = rtas_call(ibm_configure_bridge, 3, 1, NULL, 473 ret = rtas_call(ibm_configure_bridge, 3, 1, NULL,
493 config_addr, BUID_HI(edev->phb->buid), 474 config_addr, BUID_HI(pe->phb->buid),
494 BUID_LO(edev->phb->buid)); 475 BUID_LO(pe->phb->buid));
495 } else { 476 } else {
496 return -EFAULT; 477 return -EFAULT;
497 } 478 }
498 479
499 if (ret) 480 if (ret)
500 pr_warning("%s: Unable to configure bridge %d for %s\n", 481 pr_warning("%s: Unable to configure bridge PHB#%d-PE#%x (%d)\n",
501 __func__, ret, dn->full_name); 482 __func__, pe->phb->global_number, pe->addr, ret);
502 483
503 return ret; 484 return ret;
504} 485}