From: Samuel Iglesias Gonsalvez Date: Mon, 10 Dec 2012 10:50:01 +0000 (+0100) Subject: ipack/devices/ipoctal: setup TTY_NORMAL flag for each character. X-Git-Tag: firefly_0821_release~3680^2~1077^2~121 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b5071f2cd89bfd88cc3c3a820cbb9e7d7d9b5c92;p=firefly-linux-kernel-4.4.55.git ipack/devices/ipoctal: setup TTY_NORMAL flag for each character. In case of several characters present in RxFIFO, they will have the flag of the previous one, no matter if the actual character was received properly or not. This patch fixes this bug. Signed-off-by: Samuel Iglesias Gonsalvez Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c index 18f9cf1ffe2b..850f10506a79 100644 --- a/drivers/ipack/devices/ipoctal.c +++ b/drivers/ipack/devices/ipoctal.c @@ -121,11 +121,12 @@ static void ipoctal_irq_rx(struct ipoctal_channel *channel, struct tty_struct *tty, u8 sr) { unsigned char value; - unsigned char flag = TTY_NORMAL; + unsigned char flag; u8 isr; do { value = ioread8(&channel->regs->r.rhr); + flag = TTY_NORMAL; /* Error: count statistics */ if (sr & SR_ERROR) { iowrite8(CR_CMD_RESET_ERR_STATUS, &channel->regs->w.cr);