Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163866
b: refs/heads/master
c: d2cfe96
h: refs/heads/master
v: v3
  • Loading branch information
Peter Korsgaard authored and Live-CD User committed Sep 19, 2009
1 parent 9d598a3 commit d86a631
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 054f2346cb0e524cbb678759bfedabfdba4d0100
refs/heads/master: d2cfe9628c6187cafd1aac32a44dcd9ed7adb5fe
15 changes: 10 additions & 5 deletions trunk/drivers/serial/uartlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,22 @@ static int ulite_transmit(struct uart_port *port, int stat)
static irqreturn_t ulite_isr(int irq, void *dev_id)
{
struct uart_port *port = dev_id;
int busy;
int busy, n = 0;

do {
int stat = readb(port->membase + ULITE_STATUS);
busy = ulite_receive(port, stat);
busy |= ulite_transmit(port, stat);
n++;
} while (busy);

tty_flip_buffer_push(port->state->port.tty);

return IRQ_HANDLED;
/* work done? */
if (n > 1) {
tty_flip_buffer_push(port->state->port.tty);
return IRQ_HANDLED;
} else {
return IRQ_NONE;
}
}

static unsigned int ulite_tx_empty(struct uart_port *port)
Expand Down Expand Up @@ -221,7 +226,7 @@ static int ulite_startup(struct uart_port *port)
int ret;

ret = request_irq(port->irq, ulite_isr,
IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "uartlite", port);
IRQF_SHARED | IRQF_SAMPLE_RANDOM, "uartlite", port);
if (ret)
return ret;

Expand Down

0 comments on commit d86a631

Please sign in to comment.