Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17725
b: refs/heads/master
c: fcb7543
h: refs/heads/master
i:
  17723: f71073a
v: v3
  • Loading branch information
Linas Vepstas authored and Paul Mackerras committed Jan 10, 2006
1 parent 4f927d3 commit 7100419
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 821b537fd7bf9018f1df4b882cea199613147f65
refs/heads/master: fcb7543e3d01ad9ebd3498eb50fcf323edb163ab
27 changes: 23 additions & 4 deletions trunk/arch/powerpc/platforms/pseries/eeh.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,21 @@ static DEFINE_PER_CPU(unsigned long, slot_resets);

void eeh_slot_error_detail (struct pci_dn *pdn, int severity)
{
int config_addr;
unsigned long flags;
int rc;

/* Log the error with the rtas logger */
spin_lock_irqsave(&slot_errbuf_lock, flags);
memset(slot_errbuf, 0, eeh_error_buf_size);

/* Use PE configuration address, if present */
config_addr = pdn->eeh_config_addr;
if (pdn->eeh_pe_config_addr)
config_addr = pdn->eeh_pe_config_addr;

rc = rtas_call(ibm_slot_error_detail,
8, 1, NULL, pdn->eeh_config_addr,
8, 1, NULL, config_addr,
BUID_HI(pdn->phb->buid),
BUID_LO(pdn->phb->buid), NULL, 0,
virt_to_phys(slot_errbuf),
Expand All @@ -138,6 +144,7 @@ void eeh_slot_error_detail (struct pci_dn *pdn, int severity)
static int read_slot_reset_state(struct pci_dn *pdn, int rets[])
{
int token, outputs;
int config_addr;

if (ibm_read_slot_reset_state2 != RTAS_UNKNOWN_SERVICE) {
token = ibm_read_slot_reset_state2;
Expand All @@ -148,7 +155,12 @@ static int read_slot_reset_state(struct pci_dn *pdn, int rets[])
outputs = 3;
}

return rtas_call(token, 3, outputs, rets, pdn->eeh_config_addr,
/* Use PE configuration address, if present */
config_addr = pdn->eeh_config_addr;
if (pdn->eeh_pe_config_addr)
config_addr = pdn->eeh_pe_config_addr;

return rtas_call(token, 3, outputs, rets, config_addr,
BUID_HI(pdn->phb->buid), BUID_LO(pdn->phb->buid));
}

Expand Down Expand Up @@ -284,7 +296,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
return 0;
}

if (!pdn->eeh_config_addr) {
if (!pdn->eeh_config_addr && !pdn->eeh_pe_config_addr) {
__get_cpu_var(no_cfg_addr)++;
return 0;
}
Expand Down Expand Up @@ -613,13 +625,20 @@ void eeh_save_bars(struct pci_dev * pdev, struct pci_dn *pdn)
void
rtas_configure_bridge(struct pci_dn *pdn)
{
int config_addr;
int token = rtas_token ("ibm,configure-bridge");
int rc;

if (token == RTAS_UNKNOWN_SERVICE)
return;

/* Use PE configuration address, if present */
config_addr = pdn->eeh_config_addr;
if (pdn->eeh_pe_config_addr)
config_addr = pdn->eeh_pe_config_addr;

rc = rtas_call(token,3,1, NULL,
pdn->eeh_config_addr,
config_addr,
BUID_HI(pdn->phb->buid),
BUID_LO(pdn->phb->buid));
if (rc) {
Expand Down

0 comments on commit 7100419

Please sign in to comment.