Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipoctal: clear break interrupt as soon as it occurs

In some condition we receive the break interrupt but nothing is putted
in the Rx FIFO and the correspondend bit in the status register is not
set. Thus, no-one clear the interrupt and the handler will be called
forever.

This patch clear the break interrupt as soon as it occurs. Then, if the
break character '\0' is putted in the fifo we will manage it.

We can also unmask the Break interrupt but its bit in ISR is still set
on break. So I think is better to keep the registers clean.

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Federico Vaga and committed by
Greg Kroah-Hartman
95e838c9 1451f414

+3 -1
+3 -1
drivers/ipack/devices/ipoctal.c
··· 175 175 flag = TTY_FRAME; 176 176 } 177 177 if (sr & SR_RECEIVED_BREAK) { 178 - iowrite8(CR_CMD_RESET_BREAK_CHANGE, &channel->regs->w.cr); 179 178 channel->stats.rcv_break++; 180 179 flag = TTY_BREAK; 181 180 } ··· 218 219 * to read from */ 219 220 isr = ioread8(&channel->block_regs->r.isr); 220 221 sr = ioread8(&channel->regs->r.sr); 222 + 223 + if (isr & (IMR_DELTA_BREAK_A | IMR_DELTA_BREAK_B)) 224 + iowrite8(CR_CMD_RESET_BREAK_CHANGE, &channel->regs->w.cr); 221 225 222 226 if ((sr & SR_TX_EMPTY) && (channel->nb_bytes == 0)) { 223 227 iowrite8(CR_DISABLE_TX, &channel->regs->w.cr);