PPCDBG(PPCDBG_BUSWALK, "PCI:- allocate and assign IRQ 0x%02X.%02X.%02X = 0x%02X\n", Bus, 0, EADsIdSel, Irq); 
static int scan_bridge_slot(HvBusNumber Bus,		struct HvCallPci_BridgeInfo *BridgeInfo){	struct device_node *node;	HvSubBusNumber SubBus = BridgeInfo->subBusNumber;	u16 VendorId = 0;	int HvRc = 0;	u8 Irq = 0;	int IdSel = ISERIES_GET_DEVICE_FROM_SUBBUS(SubBus);	int Function = ISERIES_GET_FUNCTION_FROM_SUBBUS(SubBus);	HvAgentId EADsIdSel = ISERIES_PCI_AGENTID(IdSel, Function);	/* iSeries_allocate_IRQ.: 0x18.00.12(0xA3) */	Irq = iSeries_allocate_IRQ(Bus, 0, EADsIdSel);	PPCDBG(PPCDBG_BUSWALK,		"PCI:- allocate and assign IRQ 0x%02X.%02X.%02X = 0x%02X\n",		Bus, 0, EADsIdSel, Irq);	/*	 * Connect all functions of any device found.	 */	for (IdSel = 1; IdSel <= BridgeInfo->maxAgents; ++IdSel) {		for (Function = 0; Function < 8; ++Function) {			HvAgentId AgentId = ISERIES_PCI_AGENTID(IdSel, Function);			HvRc = HvCallXm_connectBusUnit(Bus, SubBus,					AgentId, Irq);			if (HvRc != 0) {				pci_Log_Error("Connect Bus Unit",					      Bus, SubBus, AgentId, HvRc);				continue;			}			HvRc = HvCallPci_configLoad16(Bus, SubBus, AgentId,						      PCI_VENDOR_ID, &VendorId);			if (HvRc != 0) {				pci_Log_Error("Read Vendor",					      Bus, SubBus, AgentId, HvRc);				continue;			}			printk("read vendor ID: %x\n", VendorId);			/* FoundDevice: 0x18.28.10 = 0x12AE */			PPCDBG(PPCDBG_BUSWALK,			       "PCI:- FoundDevice: 0x%02X.%02X.%02X = 0x%04X, irq %d\n",			       Bus, SubBus, AgentId, VendorId, Irq);			HvRc = HvCallPci_configStore8(Bus, SubBus, AgentId,						      PCI_INTERRUPT_LINE, Irq);			if (HvRc != 0)				pci_Log_Error("PciCfgStore Irq Failed!",					      Bus, SubBus, AgentId, HvRc);			++DeviceCount;			node = build_device_node(Bus, SubBus, EADsIdSel, Function);			PCI_DN(node)->Irq = Irq;			PCI_DN(node)->LogicalSlot = BridgeInfo->logicalSlotNumber;		} /* for (Function = 0; Function < 8; ++Function) */	} /* for (IdSel = 1; IdSel <= MaxAgents; ++IdSel) */	return HvRc;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/dcad47fc423ac9f4934579af814fa2dad5c8081b/pci.c/clean/arch/powerpc/platforms/iseries/pci.c