aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinas Vepstas <linas@linas.org>2005-11-03 19:54:39 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-09 23:29:55 -0500
commitfcb7543e3d01ad9ebd3498eb50fcf323edb163ab (patch)
tree4a4288cf782621c57ac234b109ad8d9808e67056 /arch
parent821b537fd7bf9018f1df4b882cea199613147f65 (diff)
[PATCH] powerpc: Use PE configuration address consistently
236-eeh-config-addr.patch The PE configuration address wasn't being cnsistently used in all locations where a config address is called for. This patch adds it to the places it should have appeared in. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> (cherry picked from c2bc904a28095aca0b04a37854b63b78622a032e commit)
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index d9662688c8b6..4da77571288b 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -110,6 +110,7 @@ static DEFINE_PER_CPU(unsigned long, slot_resets);
110 110
111void eeh_slot_error_detail (struct pci_dn *pdn, int severity) 111void eeh_slot_error_detail (struct pci_dn *pdn, int severity)
112{ 112{
113 int config_addr;
113 unsigned long flags; 114 unsigned long flags;
114 int rc; 115 int rc;
115 116
@@ -117,8 +118,13 @@ void eeh_slot_error_detail (struct pci_dn *pdn, int severity)
117 spin_lock_irqsave(&slot_errbuf_lock, flags); 118 spin_lock_irqsave(&slot_errbuf_lock, flags);
118 memset(slot_errbuf, 0, eeh_error_buf_size); 119 memset(slot_errbuf, 0, eeh_error_buf_size);
119 120
121 /* Use PE configuration address, if present */
122 config_addr = pdn->eeh_config_addr;
123 if (pdn->eeh_pe_config_addr)
124 config_addr = pdn->eeh_pe_config_addr;
125
120 rc = rtas_call(ibm_slot_error_detail, 126 rc = rtas_call(ibm_slot_error_detail,
121 8, 1, NULL, pdn->eeh_config_addr, 127 8, 1, NULL, config_addr,
122 BUID_HI(pdn->phb->buid), 128 BUID_HI(pdn->phb->buid),
123 BUID_LO(pdn->phb->buid), NULL, 0, 129 BUID_LO(pdn->phb->buid), NULL, 0,
124 virt_to_phys(slot_errbuf), 130 virt_to_phys(slot_errbuf),
@@ -138,6 +144,7 @@ void eeh_slot_error_detail (struct pci_dn *pdn, int severity)
138static int read_slot_reset_state(struct pci_dn *pdn, int rets[]) 144static int read_slot_reset_state(struct pci_dn *pdn, int rets[])
139{ 145{
140 int token, outputs; 146 int token, outputs;
147 int config_addr;
141 148
142 if (ibm_read_slot_reset_state2 != RTAS_UNKNOWN_SERVICE) { 149 if (ibm_read_slot_reset_state2 != RTAS_UNKNOWN_SERVICE) {
143 token = ibm_read_slot_reset_state2; 150 token = ibm_read_slot_reset_state2;
@@ -148,7 +155,12 @@ static int read_slot_reset_state(struct pci_dn *pdn, int rets[])
148 outputs = 3; 155 outputs = 3;
149 } 156 }
150 157
151 return rtas_call(token, 3, outputs, rets, pdn->eeh_config_addr, 158 /* Use PE configuration address, if present */
159 config_addr = pdn->eeh_config_addr;
160 if (pdn->eeh_pe_config_addr)
161 config_addr = pdn->eeh_pe_config_addr;
162
163 return rtas_call(token, 3, outputs, rets, config_addr,
152 BUID_HI(pdn->phb->buid), BUID_LO(pdn->phb->buid)); 164 BUID_HI(pdn->phb->buid), BUID_LO(pdn->phb->buid));
153} 165}
154 166
@@ -284,7 +296,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
284 return 0; 296 return 0;
285 } 297 }
286 298
287 if (!pdn->eeh_config_addr) { 299 if (!pdn->eeh_config_addr && !pdn->eeh_pe_config_addr) {
288 __get_cpu_var(no_cfg_addr)++; 300 __get_cpu_var(no_cfg_addr)++;
289 return 0; 301 return 0;
290 } 302 }
@@ -613,13 +625,20 @@ void eeh_save_bars(struct pci_dev * pdev, struct pci_dn *pdn)
613void 625void
614rtas_configure_bridge(struct pci_dn *pdn) 626rtas_configure_bridge(struct pci_dn *pdn)
615{ 627{
628 int config_addr;
616 int token = rtas_token ("ibm,configure-bridge"); 629 int token = rtas_token ("ibm,configure-bridge");
617 int rc; 630 int rc;
618 631
619 if (token == RTAS_UNKNOWN_SERVICE) 632 if (token == RTAS_UNKNOWN_SERVICE)
620 return; 633 return;
634
635 /* Use PE configuration address, if present */
636 config_addr = pdn->eeh_config_addr;
637 if (pdn->eeh_pe_config_addr)
638 config_addr = pdn->eeh_pe_config_addr;
639
621 rc = rtas_call(token,3,1, NULL, 640 rc = rtas_call(token,3,1, NULL,
622 pdn->eeh_config_addr, 641 config_addr,
623 BUID_HI(pdn->phb->buid), 642 BUID_HI(pdn->phb->buid),
624 BUID_LO(pdn->phb->buid)); 643 BUID_LO(pdn->phb->buid));
625 if (rc) { 644 if (rc) {