Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34122
b: refs/heads/master
c: 47b5c83
h: refs/heads/master
v: v3
  • Loading branch information
Linas Vepstas authored and Paul Mackerras committed Sep 21, 2006
1 parent 96e65b1 commit 89bb632
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb5b562444c27cf53f5d297bd7a89807ea614cf3
refs/heads/master: 47b5c838af92d3504e99633bf568578203b7305f
29 changes: 29 additions & 0 deletions trunk/arch/powerpc/platforms/pseries/eeh.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,35 @@ eeh_slot_availability(struct pci_dn *pdn)
return -1;
}

/**
* rtas_pci_enable - enable MMIO or DMA transfers for this slot
* @pdn pci device node
*/

int
rtas_pci_enable(struct pci_dn *pdn, int function)
{
int config_addr;
int rc;

/* 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_set_eeh_option, 4, 1, NULL,
config_addr,
BUID_HI(pdn->phb->buid),
BUID_LO(pdn->phb->buid),
function);

if (rc)
printk(KERN_WARNING "EEH: Cannot enable function %d, err=%d dn=%s\n",
function, rc, pdn->node->full_name);

return rc;
}

/**
* rtas_pci_slot_reset - raises/lowers the pci #RST line
* @pdn pci device node
Expand Down
11 changes: 11 additions & 0 deletions trunk/include/asm-powerpc/ppc-pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ struct pci_dev *pci_get_device_by_addr(unsigned long addr);
*/
void eeh_slot_error_detail (struct pci_dn *pdn, int severity);

/**
* rtas_pci_enableo - enable IO transfers for this slot
* @pdn: pci device node
* @function: either EEH_THAW_MMIO or EEH_THAW_DMA
*
* Enable I/O transfers to this slot
*/
#define EEH_THAW_MMIO 2
#define EEH_THAW_DMA 3
int rtas_pci_enable(struct pci_dn *pdn, int function);

/**
* rtas_set_slot_reset -- unfreeze a frozen slot
*
Expand Down

0 comments on commit 89bb632

Please sign in to comment.