/* 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)
/* 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;
	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: Unexpected state change %d, err=%d dn=%s\n",
		        function, rc, pdn->node->full_name);
	rc = eeh_wait_for_slot_status (pdn, PCI_BUS_RESET_WAIT_MSEC);
	if ((rc == 4) && (function == EEH_THAW_MMIO))
		return 0;
	return rc;
}