jifwait = jiffies + hertz; while (time_before(jiffies, jifwait)) { set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(1); } 
msleep(1000); 
static int ixj_linetest(IXJ *j){	unsigned long jifwait;	j->flags.pstncheck = 1;	/* Testing */	j->flags.pstn_present = 0; /* Assume the line is not there */	daa_int_read(j);	/*Clear DAA Interrupt flags */	/* */	/* Hold all relays in the normally de-energized position. */	/* */	j->pld_slicw.bits.rly1 = 0;	j->pld_slicw.bits.rly2 = 0;	j->pld_slicw.bits.rly3 = 0;	outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);	j->pld_scrw.bits.daafsyncen = 0;	/* Turn off DAA Frame Sync */	outb_p(j->pld_scrw.byte, j->XILINXbase);	j->pld_slicr.byte = inb_p(j->XILINXbase + 0x01);	if (j->pld_slicr.bits.potspstn) {		j->flags.pots_pstn = 1;		j->flags.pots_correct = 0;		LED_SetState(0x4, j);	} else {		j->flags.pots_pstn = 0;		j->pld_slicw.bits.rly1 = 0;		j->pld_slicw.bits.rly2 = 0;		j->pld_slicw.bits.rly3 = 1;		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);		j->pld_scrw.bits.daafsyncen = 0;	/* Turn off DAA Frame Sync */		outb_p(j->pld_scrw.byte, j->XILINXbase);		daa_set_mode(j, SOP_PU_CONVERSATION);		jifwait = jiffies + hertz;		while (time_before(jiffies, jifwait)) {			set_current_state(TASK_INTERRUPTIBLE);			schedule_timeout(1);		}		daa_int_read(j);		daa_set_mode(j, SOP_PU_RESET);		if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.VDD_OK) {			j->flags.pots_correct = 0;	/* Should not be line voltage on POTS port. */			LED_SetState(0x4, j);			j->pld_slicw.bits.rly3 = 0;			outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);		} else {			j->flags.pots_correct = 1;			LED_SetState(0x8, j);			j->pld_slicw.bits.rly1 = 1;			j->pld_slicw.bits.rly2 = 0;			j->pld_slicw.bits.rly3 = 0;			outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);		}	}	j->pld_slicw.bits.rly3 = 0;	outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);	daa_set_mode(j, SOP_PU_CONVERSATION);	jifwait = jiffies + hertz;	while (time_before(jiffies, jifwait)) {		set_current_state(TASK_INTERRUPTIBLE);		schedule_timeout(1);	}	daa_int_read(j);	daa_set_mode(j, SOP_PU_RESET);	if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.VDD_OK) {		j->pstn_sleeptil = jiffies + (hertz / 4);		j->flags.pstn_present = 1;	} else {		j->flags.pstn_present = 0;	}	if (j->flags.pstn_present) {		if (j->flags.pots_correct) {			LED_SetState(0xA, j);		} else {			LED_SetState(0x6, j);		}	} else {		if (j->flags.pots_correct) {			LED_SetState(0x9, j);		} else {			LED_SetState(0x5, j);		}	}	j->flags.pstncheck = 0;	/* Testing */	return j->flags.pstn_present;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/f4c9925ccc185da68c2d42230711d017f222e420/ixj.c/buggy/drivers/telephony/ixj.c