set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(1); 
schedule_timeout_interruptible(1); 
static int identify_board(unsigned long rambase, unsigned int iobase){	unsigned int pgport;	unsigned long sig;	DualPortMemory *dpm;	RspMessage rcvmsg;	ReqMessage sndmsg;	HWConfig_pl hwci;	int x;	pr_debug("Attempting to identify adapter @ 0x%x io 0x%x\n",		rambase, iobase);	/*	 * Enable the base pointer	 */	outb(rambase >> 12, iobase + 0x2c00);	switch(rambase >> 12 & 0x0F) {	case 0x0:		pgport = iobase + PG0_OFFSET;		pr_debug("Page Register offset is 0x%x\n", PG0_OFFSET);		break;			case 0x4:		pgport = iobase + PG1_OFFSET;		pr_debug("Page Register offset is 0x%x\n", PG1_OFFSET);		break;	case 0x8:		pgport = iobase + PG2_OFFSET;		pr_debug("Page Register offset is 0x%x\n", PG2_OFFSET);		break;	case 0xC:		pgport = iobase + PG3_OFFSET;		pr_debug("Page Register offset is 0x%x\n", PG3_OFFSET);		break;	default:		pr_debug("Invalid rambase 0x%lx\n", rambase);		return -1;	}	/*	 * Try to identify a PRI card	 */	outb(PRI_BASEPG_VAL, pgport);	msleep_interruptible(1000);	sig = readl(rambase + SIG_OFFSET);	pr_debug("Looking for a signature, got 0x%x\n", sig);	if(sig == SIGNATURE)		return PRI_BOARD;	/*	 * Try to identify a PRI card	 */	outb(BRI_BASEPG_VAL, pgport);	msleep_interruptible(1000);	sig = readl(rambase + SIG_OFFSET);	pr_debug("Looking for a signature, got 0x%x\n", sig);	if(sig == SIGNATURE)		return BRI_BOARD;	return -1;	/*	 * Try to spot a card	 */	sig = readl(rambase + SIG_OFFSET);	pr_debug("Looking for a signature, got 0x%x\n", sig);	if(sig != SIGNATURE)		return -1;	dpm = (DualPortMemory *) rambase;	memset(&sndmsg, 0, MSG_LEN);	sndmsg.msg_byte_cnt = 3;	sndmsg.type = cmReqType1;	sndmsg.class = cmReqClass0;	sndmsg.code = cmReqHWConfig;	memcpy_toio(&(dpm->req_queue[dpm->req_head++]), &sndmsg, MSG_LEN);	outb(0, iobase + 0x400);	pr_debug("Sent HWConfig message\n");	/*	 * Wait for the response	 */	x = 0;	while((inb(iobase + FIFOSTAT_OFFSET) & RF_HAS_DATA) && x < 100) {		set_current_state(TASK_INTERRUPTIBLE);		schedule_timeout(1);		x++;	}	if(x == 100) {		pr_debug("Timeout waiting for response\n");		return -1;	}	memcpy_fromio(&rcvmsg, &(dpm->rsp_queue[dpm->rsp_tail]), MSG_LEN);	pr_debug("Got HWConfig response, status = 0x%x\n", rcvmsg.rsp_status);	memcpy(&hwci, &(rcvmsg.msg_data.HWCresponse), sizeof(HWConfig_pl));	pr_debug("Hardware Config: Interface: %s, RAM Size: %d, Serial: %s\n"		 "                 Part: %s, Rev: %s\n",		 hwci.st_u_sense ? "S/T" : "U", hwci.ram_size,		 hwci.serial_no, hwci.part_no, hwci.rev_no);	if(!strncmp(PRI_PARTNO, hwci.part_no, 6))		return PRI_BOARD;	if(!strncmp(BRI_PARTNO, hwci.part_no, 6))		return BRI_BOARD;			return -1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/24763c48a3c9cdf0a138038b51a7fca65859cd78/init.c/clean/drivers/isdn/sc/init.c