Showing error 534

User: Jiri Slaby
Error type: Calling function from invalid context
Error type description: Some function is called at inappropriate place like sleep inside critical sections or interrupt handlers
File location: drivers/char/riscom8.c
Line in file: 1069
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:02 UTC


Source:

1039         * disable the receive line status interrupts, and tell the
1040         * interrupt driver to stop checking the data ready bit in the
1041         * line status register.
1042         */
1043        port->IER &= ~IER_RXD;
1044        if (port->port.flags & ASYNC_INITIALIZED) {
1045                port->IER &= ~IER_TXRDY;
1046                port->IER |= IER_TXEMPTY;
1047                rc_out(bp, CD180_CAR, port_No(port));
1048                rc_out(bp, CD180_IER, port->IER);
1049                /*
1050                 * Before we drop DTR, make sure the UART transmitter
1051                 * has completely drained; this is especially
1052                 * important if there is a transmit FIFO!
1053                 */
1054                timeout = jiffies + HZ;
1055                while (port->IER & IER_TXEMPTY) {
1056                        msleep_interruptible(jiffies_to_msecs(port->timeout));
1057                        if (time_after(jiffies, timeout))
1058                                break;
1059                }
1060        }
1061        rc_shutdown_port(tty, bp, port);
1062        rc_flush_buffer(tty);
1063        tty_ldisc_flush(tty);
1064
1065        tty->closing = 0;
1066        port->port.tty = NULL;
1067        if (port->port.blocked_open) {
1068                if (port->port.close_delay)
1069                        msleep_interruptible(jiffies_to_msecs(port->port.close_delay));
1070                wake_up_interruptible(&port->port.open_wait);
1071        }
1072        port->port.flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
1073        wake_up_interruptible(&port->port.close_wait);
1074
1075out:
1076        spin_unlock_irqrestore(&riscom_lock, flags);
1077}
1078
1079static int rc_write(struct tty_struct *tty,
Show full sources