static _INLINE_ void receive_chars(struct mcf_serial *info, volatile unsigned char *uartp) { struct tty_struct *tty = info->tty; unsigned char status, ch; if (!tty) return; while ((status = uartp[MCFUART_USR]) & MCFUART_USR_RXREADY) { if (tty->flip.count >= TTY_FLIPBUF_SIZE) { /* * can't take any more data. Turn off receiver * so that the interrupt doesn't continually * occur. */ info->imr &= ~MCFUART_UIR_RXREADY; uartp[MCFUART_UIMR] = info->imr; break; } .... //process the character } schedule_delayed_work(&tty->flip.work, 1); return; }
if (tty->flip.count >= TTY_FLIPBUF_SIZE) { break;}
schedule_work(&tty->flip.work);