Skip to content

Commit

Permalink
tty: Char: mxser, use THRE for ASPP_OQUEUE ioctl
Browse files Browse the repository at this point in the history
In moxa specific ASPP_OQUEUE ioctl command, they apparently want
only know whether there is space in transmitter hold register.

So switch UART_LSR_TEMT to UART_LSR_THRE in that specific case
according to the change in 1.14 moxa drivers.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jiri Slaby authored and Live-CD User committed Sep 19, 2009
1 parent 502f295 commit a75b7b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/mxser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,

lock_kernel();
len = mxser_chars_in_buffer(tty);
lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_TEMT;
lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_THRE;
len += (lsr ? 0 : 1);
unlock_kernel();

Expand Down

0 comments on commit a75b7b6

Please sign in to comment.