void *eventbuf; 
void __iomem *eventbuf; 
static void doevent(int crd){ /* Begin doevent */	void *eventbuf;	struct channel *ch, *chan0;	static struct tty_struct *tty;	struct board_info *bd;	struct board_chan *bc;	unsigned int tail, head;	int event, channel;	int mstat, lstat;	/* -------------------------------------------------------------------		This subroutine is called by epcapoll when an event is detected 		in the event queue.  This routine responds to those events.	--------------------------------------------------------------------- */	bd = &boards[crd];	chan0 = card_ptr[crd];	epcaassert(chan0 <= &digi_channels[nbdevs - 1], "ch out of range");	assertgwinon(chan0);	while ((tail = readw(&chan0->mailbox->eout)) != (head = readw(&chan0->mailbox->ein)))	{ /* Begin while something in event queue */		assertgwinon(chan0);		eventbuf = bd->re_map_membase + tail + ISTART;		/* Get the channel the event occurred on */		channel = readb(eventbuf);		/* Get the actual event code that occurred */		event = readb(eventbuf + 1);		/*  ----------------------------------------------------------------			The two assignments below get the current modem status (mstat)			and the previous modem status (lstat).  These are useful becuase			an event could signal a change in modem signals itself.		------------------------------------------------------------------- */		mstat = readb(eventbuf + 2);		lstat = readb(eventbuf + 3);		ch = chan0 + channel;		if ((unsigned)channel >= bd->numports || !ch)  {			if (channel >= bd->numports)				ch = chan0;			bc = ch->brdchan;			goto next;		}		if ((bc = ch->brdchan) == NULL)			goto next;		if (event & DATA_IND)  { /* Begin DATA_IND */			receive_data(ch);			assertgwinon(ch);		} /* End DATA_IND */		/* else *//* Fix for DCD transition missed bug */		if (event & MODEMCHG_IND)  { /* Begin MODEMCHG_IND */			/* A modem signal change has been indicated */			ch->imodem = mstat;			if (ch->asyncflags & ASYNC_CHECK_CD)  {				if (mstat & ch->dcd)  /* We are now receiving dcd */					wake_up_interruptible(&ch->open_wait);				else					pc_sched_event(ch, EPCA_EVENT_HANGUP); /* No dcd; hangup */			}		} /* End MODEMCHG_IND */		tty = ch->tty;		if (tty)  { /* Begin if valid tty */			if (event & BREAK_IND)  { /* Begin if BREAK_IND */				/* A break has been indicated */				tty->flip.count++;				*tty->flip.flag_buf_ptr++ = TTY_BREAK;				*tty->flip.char_buf_ptr++ = 0;				tty_schedule_flip(tty); 			} else if (event & LOWTX_IND)  { /* Begin LOWTX_IND */				if (ch->statusflags & LOWWAIT) 				{ /* Begin if LOWWAIT */					ch->statusflags &= ~LOWWAIT;					tty_wakeup(tty);					wake_up_interruptible(&tty->write_wait);				} /* End if LOWWAIT */			} else if (event & EMPTYTX_IND)  { /* Begin EMPTYTX_IND */				/* This event is generated by setup_empty_event */				ch->statusflags &= ~TXBUSY;				if (ch->statusflags & EMPTYWAIT)  { /* Begin if EMPTYWAIT */					ch->statusflags &= ~EMPTYWAIT;					tty_wakeup(tty);					wake_up_interruptible(&tty->write_wait);				} /* End if EMPTYWAIT */			} /* End EMPTYTX_IND */		} /* End if valid tty */	next:		globalwinon(ch);		BUG_ON(!bc);		writew(1, &bc->idata);		writew((tail + 4) & (IMAX - ISTART - 4), &chan0->mailbox->eout);		globalwinon(chan0);	} /* End while something in event queue */} /* End doevent */
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/bc9a5154a24d16d41cc79dbf1442de34454bc7db/epca.c/buggy/drivers/char/epca.c