The rpc server does not require that service threads take the BKL.
[safe/jmp/linux-2.6] / drivers / serial / serial_ks8695.c
index 998e89d..2e71bbc 100644 (file)
@@ -110,7 +110,11 @@ static struct console ks8695_console;
 static void ks8695uart_stop_tx(struct uart_port *port)
 {
        if (tx_enabled(port)) {
-               disable_irq(KS8695_IRQ_UART_TX);
+               /* use disable_irq_nosync() and not disable_irq() to avoid self
+                * imposed deadlock by not waiting for irq handler to end,
+                * since this ks8695uart_stop_tx() is called from interrupt context.
+                */
+               disable_irq_nosync(KS8695_IRQ_UART_TX);
                tx_enable(port, 0);
        }
 }
@@ -150,7 +154,7 @@ static void ks8695uart_disable_ms(struct uart_port *port)
 static irqreturn_t ks8695uart_rx_chars(int irq, void *dev_id)
 {
        struct uart_port *port = dev_id;
-       struct tty_struct *tty = port->info->port.tty;
+       struct tty_struct *tty = port->state->port.tty;
        unsigned int status, ch, lsr, flg, max_count = 256;
 
        status = UART_GET_LSR(port);            /* clears pending LSR interrupts */
@@ -206,7 +210,7 @@ ignore_char:
 static irqreturn_t ks8695uart_tx_chars(int irq, void *dev_id)
 {
        struct uart_port *port = dev_id;
-       struct circ_buf *xmit = &port->info->xmit;
+       struct circ_buf *xmit = &port->state->xmit;
        unsigned int count;
 
        if (port->x_char) {
@@ -262,7 +266,7 @@ static irqreturn_t ks8695uart_modem_status(int irq, void *dev_id)
        if (status & URMS_URTERI)
                port->icount.rng++;
 
-       wake_up_interruptible(&port->info->delta_msr_wait);
+       wake_up_interruptible(&port->state->port.delta_msr_wait);
 
        return IRQ_HANDLED;
 }
@@ -549,7 +553,7 @@ static struct uart_port ks8695uart_ports[SERIAL_KS8695_NR] = {
                .mapbase        = KS8695_UART_VA,
                .iotype         = SERIAL_IO_MEM,
                .irq            = KS8695_IRQ_UART_TX,
-               .uartclk        = CLOCK_TICK_RATE * 16,
+               .uartclk        = KS8695_CLOCK_RATE * 16,
                .fifosize       = 16,
                .ops            = &ks8695uart_pops,
                .flags          = ASYNC_BOOT_AUTOCONF,