Skip to content

Commit 917e2fd

Browse files
kot-begemot-ukrichardweinberger
authored andcommitted
um: Make line/tty semantics use true write IRQ
This fixes a long standing bug where large amounts of output could freeze the tty (most commonly seen on stdio console). While the bug has always been there it became more pronounced after moving to the new interrupt controller. The line semantics are now changed to have true IRQ write semantics which should further improve the tty/line subsystem stability and performance Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 59fdf91 commit 917e2fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/um/drivers/line.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data)
261261
if (err == 0) {
262262
spin_unlock(&line->lock);
263263
return IRQ_NONE;
264-
} else if (err < 0) {
264+
} else if ((err < 0) && (err != -EAGAIN)) {
265265
line->head = line->buffer;
266266
line->tail = line->buffer;
267267
}
@@ -284,7 +284,7 @@ int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
284284
if (err)
285285
return err;
286286
if (output)
287-
err = um_request_irq(driver->write_irq, fd, IRQ_NONE,
287+
err = um_request_irq(driver->write_irq, fd, IRQ_WRITE,
288288
line_write_interrupt, IRQF_SHARED,
289289
driver->write_irq_name, data);
290290
return err;

0 commit comments

Comments
 (0)