mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
TTY: switch tty_insert_flip_char
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. tty_insert_flip_char is the next one to proceed. This one is used all over the code, so the patch is huge. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2f69335710
commit
92a19f9cec
76 changed files with 297 additions and 286 deletions
|
@ -46,13 +46,14 @@ typedef union _srmcons_result {
|
||||||
static int
|
static int
|
||||||
srmcons_do_receive_chars(struct tty_struct *tty)
|
srmcons_do_receive_chars(struct tty_struct *tty)
|
||||||
{
|
{
|
||||||
|
struct tty_port *port = tty->port;
|
||||||
srmcons_result result;
|
srmcons_result result;
|
||||||
int count = 0, loops = 0;
|
int count = 0, loops = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
result.as_long = callback_getc(0);
|
result.as_long = callback_getc(0);
|
||||||
if (result.bits.status < 2) {
|
if (result.bits.status < 2) {
|
||||||
tty_insert_flip_char(tty, (char)result.bits.c, 0);
|
tty_insert_flip_char(port, (char)result.bits.c, 0);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
} while((result.bits.status & 1) && (++loops < 10));
|
} while((result.bits.status & 1) && (++loops < 10));
|
||||||
|
|
|
@ -55,6 +55,7 @@ static struct console *console;
|
||||||
|
|
||||||
static void receive_chars(struct tty_struct *tty)
|
static void receive_chars(struct tty_struct *tty)
|
||||||
{
|
{
|
||||||
|
struct tty_port *port = tty->port;
|
||||||
unsigned char ch;
|
unsigned char ch;
|
||||||
static unsigned char seen_esc = 0;
|
static unsigned char seen_esc = 0;
|
||||||
|
|
||||||
|
@ -81,7 +82,7 @@ static void receive_chars(struct tty_struct *tty)
|
||||||
}
|
}
|
||||||
seen_esc = 0;
|
seen_esc = 0;
|
||||||
|
|
||||||
if (tty_insert_flip_char(tty, ch, TTY_NORMAL) == 0)
|
if (tty_insert_flip_char(port, ch, TTY_NORMAL) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
|
|
@ -667,14 +667,14 @@ insert:
|
||||||
else
|
else
|
||||||
flag = TTY_NORMAL;
|
flag = TTY_NORMAL;
|
||||||
|
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(port, ch, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* overrun is special, since it's reported immediately, and doesn't
|
/* overrun is special, since it's reported immediately, and doesn't
|
||||||
* affect the current character
|
* affect the current character
|
||||||
*/
|
*/
|
||||||
if (overrun)
|
if (overrun)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||||
|
|
||||||
count--;
|
count--;
|
||||||
if (count <= 0) {
|
if (count <= 0) {
|
||||||
|
|
|
@ -147,7 +147,7 @@ static void pdc_console_poll(unsigned long unused)
|
||||||
data = pdc_console_poll_key(NULL);
|
data = pdc_console_poll_key(NULL);
|
||||||
if (data == -1)
|
if (data == -1)
|
||||||
break;
|
break;
|
||||||
tty_insert_flip_char(tty, data & 0xFF, TTY_NORMAL);
|
tty_insert_flip_char(&tty_port, data & 0xFF, TTY_NORMAL);
|
||||||
count ++;
|
count ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,12 +81,6 @@ static const struct chan_ops not_configged_ops = {
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_NOCONFIG_CHAN */
|
#endif /* CONFIG_NOCONFIG_CHAN */
|
||||||
|
|
||||||
static void tty_receive_char(struct tty_struct *tty, char ch)
|
|
||||||
{
|
|
||||||
if (tty)
|
|
||||||
tty_insert_flip_char(tty, ch, TTY_NORMAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int open_one_chan(struct chan *chan)
|
static int open_one_chan(struct chan *chan)
|
||||||
{
|
{
|
||||||
int fd, err;
|
int fd, err;
|
||||||
|
@ -569,7 +563,7 @@ void chan_interrupt(struct line *line, struct tty_struct *tty, int irq)
|
||||||
}
|
}
|
||||||
err = chan->ops->read(chan->fd, &c, chan->data);
|
err = chan->ops->read(chan->fd, &c, chan->data);
|
||||||
if (err > 0)
|
if (err > 0)
|
||||||
tty_receive_char(tty, c);
|
tty_insert_flip_char(port, c, TTY_NORMAL);
|
||||||
} while (err > 0);
|
} while (err > 0);
|
||||||
|
|
||||||
if (err == 0)
|
if (err == 0)
|
||||||
|
|
|
@ -98,6 +98,7 @@ static int rs_write(struct tty_struct * tty,
|
||||||
static void rs_poll(unsigned long priv)
|
static void rs_poll(unsigned long priv)
|
||||||
{
|
{
|
||||||
struct tty_struct* tty = (struct tty_struct*) priv;
|
struct tty_struct* tty = (struct tty_struct*) priv;
|
||||||
|
struct tty_port *port = tty->port;
|
||||||
|
|
||||||
struct timeval tv = { .tv_sec = 0, .tv_usec = 0 };
|
struct timeval tv = { .tv_sec = 0, .tv_usec = 0 };
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -107,7 +108,7 @@ static void rs_poll(unsigned long priv)
|
||||||
|
|
||||||
while (__simc(SYS_select_one, 0, XTISS_SELECT_ONE_READ, (int)&tv,0,0)){
|
while (__simc(SYS_select_one, 0, XTISS_SELECT_ONE_READ, (int)&tv,0,0)){
|
||||||
__simc (SYS_read, 0, (unsigned long)&c, 1, 0, 0);
|
__simc (SYS_read, 0, (unsigned long)&c, 1, 0, 0);
|
||||||
tty_insert_flip_char(tty, c, TTY_NORMAL);
|
tty_insert_flip_char(port, c, TTY_NORMAL);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -945,7 +945,7 @@ static void rx_ready_async(MGSLPC_INFO *info, int tcd, struct tty_struct *tty)
|
||||||
else if (status & BIT6)
|
else if (status & BIT6)
|
||||||
flag = TTY_FRAME;
|
flag = TTY_FRAME;
|
||||||
}
|
}
|
||||||
work += tty_insert_flip_char(tty, data, flag);
|
work += tty_insert_flip_char(port, data, flag);
|
||||||
}
|
}
|
||||||
issue_command(info, CHA, CMD_RXFIFO);
|
issue_command(info, CHA, CMD_RXFIFO);
|
||||||
|
|
||||||
|
|
|
@ -136,6 +136,7 @@ static int ipoctal_get_icount(struct tty_struct *tty,
|
||||||
static void ipoctal_irq_rx(struct ipoctal_channel *channel,
|
static void ipoctal_irq_rx(struct ipoctal_channel *channel,
|
||||||
struct tty_struct *tty, u8 sr)
|
struct tty_struct *tty, u8 sr)
|
||||||
{
|
{
|
||||||
|
struct tty_port *port = &channel->tty_port;
|
||||||
unsigned char value;
|
unsigned char value;
|
||||||
unsigned char flag = TTY_NORMAL;
|
unsigned char flag = TTY_NORMAL;
|
||||||
u8 isr;
|
u8 isr;
|
||||||
|
@ -149,7 +150,7 @@ static void ipoctal_irq_rx(struct ipoctal_channel *channel,
|
||||||
if (sr & SR_OVERRUN_ERROR) {
|
if (sr & SR_OVERRUN_ERROR) {
|
||||||
channel->stats.overrun_err++;
|
channel->stats.overrun_err++;
|
||||||
/* Overrun doesn't affect the current character*/
|
/* Overrun doesn't affect the current character*/
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
if (sr & SR_PARITY_ERROR) {
|
if (sr & SR_PARITY_ERROR) {
|
||||||
channel->stats.parity_err++;
|
channel->stats.parity_err++;
|
||||||
|
@ -165,7 +166,7 @@ static void ipoctal_irq_rx(struct ipoctal_channel *channel,
|
||||||
flag = TTY_BREAK;
|
flag = TTY_BREAK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tty_insert_flip_char(tty, value, flag);
|
tty_insert_flip_char(port, value, flag);
|
||||||
|
|
||||||
/* Check if there are more characters in RX FIFO
|
/* Check if there are more characters in RX FIFO
|
||||||
* If there are more, the isr register for this channel
|
* If there are more, the isr register for this channel
|
||||||
|
|
|
@ -913,7 +913,7 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack)
|
||||||
while ((count_pull < skb->len) && (len > 0)) {
|
while ((count_pull < skb->len) && (len > 0)) {
|
||||||
/* push every character but the last to the tty buffer directly */
|
/* push every character but the last to the tty buffer directly */
|
||||||
if (count_put)
|
if (count_put)
|
||||||
tty_insert_flip_char(tty, last, TTY_NORMAL);
|
tty_insert_flip_char(port, last, TTY_NORMAL);
|
||||||
len--;
|
len--;
|
||||||
if (dev->drv[di]->DLEflag & DLEmask) {
|
if (dev->drv[di]->DLEflag & DLEmask) {
|
||||||
last = DLE;
|
last = DLE;
|
||||||
|
@ -953,16 +953,16 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack)
|
||||||
* Now we can dequeue it.
|
* Now we can dequeue it.
|
||||||
*/
|
*/
|
||||||
if (cisco_hack)
|
if (cisco_hack)
|
||||||
tty_insert_flip_char(tty, last, 0xFF);
|
tty_insert_flip_char(port, last, 0xFF);
|
||||||
else
|
else
|
||||||
tty_insert_flip_char(tty, last, TTY_NORMAL);
|
tty_insert_flip_char(port, last, TTY_NORMAL);
|
||||||
#ifdef CONFIG_ISDN_AUDIO
|
#ifdef CONFIG_ISDN_AUDIO
|
||||||
ISDN_AUDIO_SKB_LOCK(skb) = 0;
|
ISDN_AUDIO_SKB_LOCK(skb) = 0;
|
||||||
#endif
|
#endif
|
||||||
skb = skb_dequeue(&dev->drv[di]->rpqueue[channel]);
|
skb = skb_dequeue(&dev->drv[di]->rpqueue[channel]);
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb(skb);
|
||||||
} else {
|
} else {
|
||||||
tty_insert_flip_char(tty, last, TTY_NORMAL);
|
tty_insert_flip_char(port, last, TTY_NORMAL);
|
||||||
/* Not yet emptied this buff, so it
|
/* Not yet emptied this buff, so it
|
||||||
* must stay in the queue, for further calls
|
* must stay in the queue, for further calls
|
||||||
* but we pull off the data we got until now.
|
* but we pull off the data we got until now.
|
||||||
|
|
|
@ -92,11 +92,11 @@ isdn_tty_try_read(modem_info *info, struct sk_buff *skb)
|
||||||
unsigned char *dp = skb->data;
|
unsigned char *dp = skb->data;
|
||||||
while (--l) {
|
while (--l) {
|
||||||
if (*dp == DLE)
|
if (*dp == DLE)
|
||||||
tty_insert_flip_char(tty, DLE, 0);
|
tty_insert_flip_char(port, DLE, 0);
|
||||||
tty_insert_flip_char(tty, *dp++, 0);
|
tty_insert_flip_char(port, *dp++, 0);
|
||||||
}
|
}
|
||||||
if (*dp == DLE)
|
if (*dp == DLE)
|
||||||
tty_insert_flip_char(tty, DLE, 0);
|
tty_insert_flip_char(port, DLE, 0);
|
||||||
last = *dp;
|
last = *dp;
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
|
@ -107,9 +107,9 @@ isdn_tty_try_read(modem_info *info, struct sk_buff *skb)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (info->emu.mdmreg[REG_CPPP] & BIT_CPPP)
|
if (info->emu.mdmreg[REG_CPPP] & BIT_CPPP)
|
||||||
tty_insert_flip_char(tty, last, 0xFF);
|
tty_insert_flip_char(port, last, 0xFF);
|
||||||
else
|
else
|
||||||
tty_insert_flip_char(tty, last, TTY_NORMAL);
|
tty_insert_flip_char(port, last, TTY_NORMAL);
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
|
|
||||||
|
@ -2287,7 +2287,7 @@ isdn_tty_at_cout(char *msg, modem_info *info)
|
||||||
if (skb) {
|
if (skb) {
|
||||||
*sp++ = c;
|
*sp++ = c;
|
||||||
} else {
|
} else {
|
||||||
if (tty_insert_flip_char(tty, c, TTY_NORMAL) == 0)
|
if (tty_insert_flip_char(port, c, TTY_NORMAL) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -419,7 +419,7 @@ static void sdio_uart_receive_chars(struct sdio_uart_port *port,
|
||||||
|
|
||||||
if ((*status & port->ignore_status_mask & ~UART_LSR_OE) == 0)
|
if ((*status & port->ignore_status_mask & ~UART_LSR_OE) == 0)
|
||||||
if (tty)
|
if (tty)
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(&port->port, ch, flag);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Overrun is special. Since it's reported immediately,
|
* Overrun is special. Since it's reported immediately,
|
||||||
|
@ -427,7 +427,8 @@ static void sdio_uart_receive_chars(struct sdio_uart_port *port,
|
||||||
*/
|
*/
|
||||||
if (*status & ~port->ignore_status_mask & UART_LSR_OE)
|
if (*status & ~port->ignore_status_mask & UART_LSR_OE)
|
||||||
if (tty)
|
if (tty)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(&port->port, 0,
|
||||||
|
TTY_OVERRUN);
|
||||||
|
|
||||||
*status = sdio_in(port, UART_LSR);
|
*status = sdio_in(port, UART_LSR);
|
||||||
} while ((*status & UART_LSR_DR) && (max_count-- > 0));
|
} while ((*status & UART_LSR_DR) && (max_count-- > 0));
|
||||||
|
|
|
@ -411,7 +411,8 @@ static void raw3215_irq(struct ccw_device *cdev, unsigned long intparm,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CTRLCHAR_CTRL:
|
case CTRLCHAR_CTRL:
|
||||||
tty_insert_flip_char(tty, cchar, TTY_NORMAL);
|
tty_insert_flip_char(&raw->port, cchar,
|
||||||
|
TTY_NORMAL);
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ kbd_put_queue(struct tty_port *port, int ch)
|
||||||
struct tty_struct *tty = tty_port_tty_get(port);
|
struct tty_struct *tty = tty_port_tty_get(port);
|
||||||
if (!tty)
|
if (!tty)
|
||||||
return;
|
return;
|
||||||
tty_insert_flip_char(tty, ch, 0);
|
tty_insert_flip_char(port, ch, 0);
|
||||||
tty_schedule_flip(tty);
|
tty_schedule_flip(tty);
|
||||||
tty_kref_put(tty);
|
tty_kref_put(tty);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ kbd_puts_queue(struct tty_port *port, char *cp)
|
||||||
if (!tty)
|
if (!tty)
|
||||||
return;
|
return;
|
||||||
while (*cp)
|
while (*cp)
|
||||||
tty_insert_flip_char(tty, *cp++, 0);
|
tty_insert_flip_char(port, *cp++, 0);
|
||||||
tty_schedule_flip(tty);
|
tty_schedule_flip(tty);
|
||||||
tty_kref_put(tty);
|
tty_kref_put(tty);
|
||||||
}
|
}
|
||||||
|
|
|
@ -342,7 +342,7 @@ sclp_tty_input(unsigned char* buf, unsigned int count)
|
||||||
case CTRLCHAR_SYSRQ:
|
case CTRLCHAR_SYSRQ:
|
||||||
break;
|
break;
|
||||||
case CTRLCHAR_CTRL:
|
case CTRLCHAR_CTRL:
|
||||||
tty_insert_flip_char(tty, cchar, TTY_NORMAL);
|
tty_insert_flip_char(&sclp_port, cchar, TTY_NORMAL);
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
break;
|
break;
|
||||||
case CTRLCHAR_NONE:
|
case CTRLCHAR_NONE:
|
||||||
|
@ -352,7 +352,7 @@ sclp_tty_input(unsigned char* buf, unsigned int count)
|
||||||
strncmp((const char *) buf + count - 2, "\252n", 2))) {
|
strncmp((const char *) buf + count - 2, "\252n", 2))) {
|
||||||
/* add the auto \n */
|
/* add the auto \n */
|
||||||
tty_insert_flip_string(tty, buf, count);
|
tty_insert_flip_string(tty, buf, count);
|
||||||
tty_insert_flip_char(tty, '\n', TTY_NORMAL);
|
tty_insert_flip_char(&sclp_port, '\n', TTY_NORMAL);
|
||||||
} else
|
} else
|
||||||
tty_insert_flip_string(tty, buf, count - 2);
|
tty_insert_flip_string(tty, buf, count - 2);
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
|
|
@ -2957,7 +2957,7 @@ check_query:
|
||||||
!(I_IGNBRK(ch->ch_tun.un_tty))) {
|
!(I_IGNBRK(ch->ch_tun.un_tty))) {
|
||||||
|
|
||||||
tty_buffer_request_room(&ch->port, 1);
|
tty_buffer_request_room(&ch->port, 1);
|
||||||
tty_insert_flip_char(ch->ch_tun.un_tty, 0, TTY_BREAK);
|
tty_insert_flip_char(&ch->port, 0, TTY_BREAK);
|
||||||
tty_flip_buffer_push(ch->ch_tun.un_tty);
|
tty_flip_buffer_push(ch->ch_tun.un_tty);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -617,7 +617,7 @@ static int fwtty_rx(struct fwtty_port *port, unsigned char *data, size_t len)
|
||||||
|
|
||||||
lsr &= port->status_mask;
|
lsr &= port->status_mask;
|
||||||
if (lsr & ~port->ignore_mask & UART_LSR_OE) {
|
if (lsr & ~port->ignore_mask & UART_LSR_OE) {
|
||||||
if (!tty_insert_flip_char(tty, 0, TTY_OVERRUN)) {
|
if (!tty_insert_flip_char(&port->port, 0, TTY_OVERRUN)) {
|
||||||
err = -EIO;
|
err = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,12 +255,11 @@ static void ProcessModemStatus(struct quatech_port *qt_port,
|
||||||
wake_up_interruptible(&qt_port->wait);
|
wake_up_interruptible(&qt_port->wait);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ProcessRxChar(struct tty_struct *tty, struct usb_serial_port *port,
|
static void ProcessRxChar(struct usb_serial_port *port, unsigned char data)
|
||||||
unsigned char data)
|
|
||||||
{
|
{
|
||||||
struct urb *urb = port->read_urb;
|
struct urb *urb = port->read_urb;
|
||||||
if (urb->actual_length)
|
if (urb->actual_length)
|
||||||
tty_insert_flip_char(tty, data, TTY_NORMAL);
|
tty_insert_flip_char(&port->port, data, TTY_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void qt_write_bulk_callback(struct urb *urb)
|
static void qt_write_bulk_callback(struct urb *urb)
|
||||||
|
@ -335,8 +334,8 @@ static void qt_status_change_check(struct tty_struct *tty,
|
||||||
case 0xff:
|
case 0xff:
|
||||||
dev_dbg(&port->dev, "No status sequence.\n");
|
dev_dbg(&port->dev, "No status sequence.\n");
|
||||||
|
|
||||||
ProcessRxChar(tty, port, data[i]);
|
ProcessRxChar(port, data[i]);
|
||||||
ProcessRxChar(tty, port, data[i + 1]);
|
ProcessRxChar(port, data[i + 1]);
|
||||||
|
|
||||||
i += 2;
|
i += 2;
|
||||||
break;
|
break;
|
||||||
|
@ -345,8 +344,8 @@ static void qt_status_change_check(struct tty_struct *tty,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tty && urb->actual_length)
|
if (urb->actual_length)
|
||||||
tty_insert_flip_char(tty, data[i], TTY_NORMAL);
|
tty_insert_flip_char(&port->port, data[i], TTY_NORMAL);
|
||||||
|
|
||||||
}
|
}
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
|
|
@ -328,9 +328,9 @@ static void receive_chars(struct serial_state *info)
|
||||||
oe = 1;
|
oe = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(&info->tport, ch, flag);
|
||||||
if (oe == 1)
|
if (oe == 1)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(&info->tport, 0, TTY_OVERRUN);
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
out:
|
out:
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -492,34 +492,34 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
|
||||||
if (tty_buffer_request_room(port, 1)) {
|
if (tty_buffer_request_room(port, 1)) {
|
||||||
if (data & info->read_status_mask) {
|
if (data & info->read_status_mask) {
|
||||||
if (data & CyBREAK) {
|
if (data & CyBREAK) {
|
||||||
tty_insert_flip_char(tty,
|
tty_insert_flip_char(port,
|
||||||
cyy_readb(info, CyRDSR),
|
cyy_readb(info, CyRDSR),
|
||||||
TTY_BREAK);
|
TTY_BREAK);
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
if (port->flags & ASYNC_SAK)
|
if (port->flags & ASYNC_SAK)
|
||||||
do_SAK(tty);
|
do_SAK(tty);
|
||||||
} else if (data & CyFRAME) {
|
} else if (data & CyFRAME) {
|
||||||
tty_insert_flip_char(tty,
|
tty_insert_flip_char(port,
|
||||||
cyy_readb(info, CyRDSR),
|
cyy_readb(info, CyRDSR),
|
||||||
TTY_FRAME);
|
TTY_FRAME);
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
info->idle_stats.frame_errs++;
|
info->idle_stats.frame_errs++;
|
||||||
} else if (data & CyPARITY) {
|
} else if (data & CyPARITY) {
|
||||||
/* Pieces of seven... */
|
/* Pieces of seven... */
|
||||||
tty_insert_flip_char(tty,
|
tty_insert_flip_char(port,
|
||||||
cyy_readb(info, CyRDSR),
|
cyy_readb(info, CyRDSR),
|
||||||
TTY_PARITY);
|
TTY_PARITY);
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
info->idle_stats.parity_errs++;
|
info->idle_stats.parity_errs++;
|
||||||
} else if (data & CyOVERRUN) {
|
} else if (data & CyOVERRUN) {
|
||||||
tty_insert_flip_char(tty, 0,
|
tty_insert_flip_char(port, 0,
|
||||||
TTY_OVERRUN);
|
TTY_OVERRUN);
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
/* If the flip buffer itself is
|
/* If the flip buffer itself is
|
||||||
overflowing, we still lose
|
overflowing, we still lose
|
||||||
the next incoming character.
|
the next incoming character.
|
||||||
*/
|
*/
|
||||||
tty_insert_flip_char(tty,
|
tty_insert_flip_char(port,
|
||||||
cyy_readb(info, CyRDSR),
|
cyy_readb(info, CyRDSR),
|
||||||
TTY_FRAME);
|
TTY_FRAME);
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
|
@ -529,12 +529,12 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
|
||||||
/* } else if(data & CyTIMEOUT) { */
|
/* } else if(data & CyTIMEOUT) { */
|
||||||
/* } else if(data & CySPECHAR) { */
|
/* } else if(data & CySPECHAR) { */
|
||||||
} else {
|
} else {
|
||||||
tty_insert_flip_char(tty, 0,
|
tty_insert_flip_char(port, 0,
|
||||||
TTY_NORMAL);
|
TTY_NORMAL);
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tty_insert_flip_char(tty, 0, TTY_NORMAL);
|
tty_insert_flip_char(port, 0, TTY_NORMAL);
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -557,7 +557,7 @@ static void cyy_chip_rx(struct cyclades_card *cinfo, int chip,
|
||||||
len = tty_buffer_request_room(port, char_count);
|
len = tty_buffer_request_room(port, char_count);
|
||||||
while (len--) {
|
while (len--) {
|
||||||
data = cyy_readb(info, CyRDSR);
|
data = cyy_readb(info, CyRDSR);
|
||||||
tty_insert_flip_char(tty, data, TTY_NORMAL);
|
tty_insert_flip_char(port, data, TTY_NORMAL);
|
||||||
info->idle_stats.recv_bytes++;
|
info->idle_stats.recv_bytes++;
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
#ifdef CY_16Y_HACK
|
#ifdef CY_16Y_HACK
|
||||||
|
@ -992,7 +992,7 @@ static void cyz_handle_rx(struct cyclades_port *info, struct tty_struct *tty)
|
||||||
new_rx_get);
|
new_rx_get);
|
||||||
new_rx_get = (new_rx_get + 1) &
|
new_rx_get = (new_rx_get + 1) &
|
||||||
(rx_bufsize - 1);
|
(rx_bufsize - 1);
|
||||||
tty_insert_flip_char(tty, data, TTY_NORMAL);
|
tty_insert_flip_char(port, data, TTY_NORMAL);
|
||||||
info->idle_stats.recv_bytes++;
|
info->idle_stats.recv_bytes++;
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
}
|
}
|
||||||
|
@ -1117,17 +1117,17 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case C_CM_PR_ERROR:
|
case C_CM_PR_ERROR:
|
||||||
tty_insert_flip_char(tty, 0, TTY_PARITY);
|
tty_insert_flip_char(&info->port, 0, TTY_PARITY);
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
special_count++;
|
special_count++;
|
||||||
break;
|
break;
|
||||||
case C_CM_FR_ERROR:
|
case C_CM_FR_ERROR:
|
||||||
tty_insert_flip_char(tty, 0, TTY_FRAME);
|
tty_insert_flip_char(&info->port, 0, TTY_FRAME);
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
special_count++;
|
special_count++;
|
||||||
break;
|
break;
|
||||||
case C_CM_RXBRK:
|
case C_CM_RXBRK:
|
||||||
tty_insert_flip_char(tty, 0, TTY_BREAK);
|
tty_insert_flip_char(&info->port, 0, TTY_BREAK);
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
special_count++;
|
special_count++;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -672,7 +672,7 @@ int hvc_poll(struct hvc_struct *hp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_MAGIC_SYSRQ */
|
#endif /* CONFIG_MAGIC_SYSRQ */
|
||||||
tty_insert_flip_char(tty, buf[i], 0);
|
tty_insert_flip_char(&hp->port, buf[i], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
read_total += n;
|
read_total += n;
|
||||||
|
|
|
@ -329,8 +329,7 @@ static void hvsi_recv_query(struct hvsi_struct *hp, uint8_t *packet)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hvsi_insert_chars(struct hvsi_struct *hp, struct tty_struct *tty,
|
static void hvsi_insert_chars(struct hvsi_struct *hp, const char *buf, int len)
|
||||||
const char *buf, int len)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -346,7 +345,7 @@ static void hvsi_insert_chars(struct hvsi_struct *hp, struct tty_struct *tty,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_MAGIC_SYSRQ */
|
#endif /* CONFIG_MAGIC_SYSRQ */
|
||||||
tty_insert_flip_char(tty, c, 0);
|
tty_insert_flip_char(&hp->port, c, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,8 +358,7 @@ static void hvsi_insert_chars(struct hvsi_struct *hp, struct tty_struct *tty,
|
||||||
* revisited.
|
* revisited.
|
||||||
*/
|
*/
|
||||||
#define TTY_THRESHOLD_THROTTLE 128
|
#define TTY_THRESHOLD_THROTTLE 128
|
||||||
static bool hvsi_recv_data(struct hvsi_struct *hp, struct tty_struct *tty,
|
static bool hvsi_recv_data(struct hvsi_struct *hp, const uint8_t *packet)
|
||||||
const uint8_t *packet)
|
|
||||||
{
|
{
|
||||||
const struct hvsi_header *header = (const struct hvsi_header *)packet;
|
const struct hvsi_header *header = (const struct hvsi_header *)packet;
|
||||||
const uint8_t *data = packet + sizeof(struct hvsi_header);
|
const uint8_t *data = packet + sizeof(struct hvsi_header);
|
||||||
|
@ -377,7 +375,7 @@ static bool hvsi_recv_data(struct hvsi_struct *hp, struct tty_struct *tty,
|
||||||
datalen = TTY_THRESHOLD_THROTTLE;
|
datalen = TTY_THRESHOLD_THROTTLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
hvsi_insert_chars(hp, tty, data, datalen);
|
hvsi_insert_chars(hp, data, datalen);
|
||||||
|
|
||||||
if (overflow > 0) {
|
if (overflow > 0) {
|
||||||
/*
|
/*
|
||||||
|
@ -438,9 +436,7 @@ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct *tty,
|
||||||
case VS_DATA_PACKET_HEADER:
|
case VS_DATA_PACKET_HEADER:
|
||||||
if (!is_open(hp))
|
if (!is_open(hp))
|
||||||
break;
|
break;
|
||||||
if (tty == NULL)
|
flip = hvsi_recv_data(hp, packet);
|
||||||
break; /* no tty buffer to put data in */
|
|
||||||
flip = hvsi_recv_data(hp, tty, packet);
|
|
||||||
break;
|
break;
|
||||||
case VS_CONTROL_PACKET_HEADER:
|
case VS_CONTROL_PACKET_HEADER:
|
||||||
hvsi_recv_control(hp, packet, tty, handshake);
|
hvsi_recv_control(hp, packet, tty, handshake);
|
||||||
|
@ -474,12 +470,12 @@ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct *tty,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hvsi_send_overflow(struct hvsi_struct *hp, struct tty_struct *tty)
|
static void hvsi_send_overflow(struct hvsi_struct *hp)
|
||||||
{
|
{
|
||||||
pr_debug("%s: delivering %i bytes overflow\n", __func__,
|
pr_debug("%s: delivering %i bytes overflow\n", __func__,
|
||||||
hp->n_throttle);
|
hp->n_throttle);
|
||||||
|
|
||||||
hvsi_insert_chars(hp, tty, hp->throttle_buf, hp->n_throttle);
|
hvsi_insert_chars(hp, hp->throttle_buf, hp->n_throttle);
|
||||||
hp->n_throttle = 0;
|
hp->n_throttle = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -514,7 +510,7 @@ static irqreturn_t hvsi_interrupt(int irq, void *arg)
|
||||||
if (tty && hp->n_throttle && !test_bit(TTY_THROTTLED, &tty->flags)) {
|
if (tty && hp->n_throttle && !test_bit(TTY_THROTTLED, &tty->flags)) {
|
||||||
/* we weren't hung up and we weren't throttled, so we can
|
/* we weren't hung up and we weren't throttled, so we can
|
||||||
* deliver the rest now */
|
* deliver the rest now */
|
||||||
hvsi_send_overflow(hp, tty);
|
hvsi_send_overflow(hp);
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&hp->lock, flags);
|
spin_unlock_irqrestore(&hp->lock, flags);
|
||||||
|
@ -1001,7 +997,7 @@ static void hvsi_unthrottle(struct tty_struct *tty)
|
||||||
|
|
||||||
spin_lock_irqsave(&hp->lock, flags);
|
spin_lock_irqsave(&hp->lock, flags);
|
||||||
if (hp->n_throttle) {
|
if (hp->n_throttle) {
|
||||||
hvsi_send_overflow(hp, tty);
|
hvsi_send_overflow(hp);
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&hp->lock, flags);
|
spin_unlock_irqrestore(&hp->lock, flags);
|
||||||
|
|
|
@ -634,7 +634,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: /* Received Break !!! */
|
case 1: /* Received Break !!! */
|
||||||
tty_insert_flip_char(tty, 0, TTY_BREAK);
|
tty_insert_flip_char(&port->port, 0, TTY_BREAK);
|
||||||
if (port->port.flags & ASYNC_SAK)
|
if (port->port.flags & ASYNC_SAK)
|
||||||
do_SAK(tty);
|
do_SAK(tty);
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
@ -658,7 +658,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
|
||||||
insw(base, rp, word_count);
|
insw(base, rp, word_count);
|
||||||
byte_count -= (word_count << 1);
|
byte_count -= (word_count << 1);
|
||||||
if (count & 0x0001) {
|
if (count & 0x0001) {
|
||||||
tty_insert_flip_char(tty, inw(base) & 0xff,
|
tty_insert_flip_char(&port->port, inw(base) & 0xff,
|
||||||
TTY_NORMAL);
|
TTY_NORMAL);
|
||||||
byte_count -= 2;
|
byte_count -= 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1429,7 +1429,7 @@ static int moxa_poll_port(struct moxa_port *p, unsigned int handle,
|
||||||
goto put;
|
goto put;
|
||||||
|
|
||||||
if (tty && (intr & IntrBreak) && !I_IGNBRK(tty)) { /* BREAK */
|
if (tty && (intr & IntrBreak) && !I_IGNBRK(tty)) { /* BREAK */
|
||||||
tty_insert_flip_char(tty, 0, TTY_BREAK);
|
tty_insert_flip_char(&p->port, 0, TTY_BREAK);
|
||||||
tty_schedule_flip(tty);
|
tty_schedule_flip(tty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2079,7 +2079,7 @@ static void mxser_receive_chars(struct tty_struct *tty,
|
||||||
}
|
}
|
||||||
while (gdl--) {
|
while (gdl--) {
|
||||||
ch = inb(port->ioaddr + UART_RX);
|
ch = inb(port->ioaddr + UART_RX);
|
||||||
tty_insert_flip_char(tty, ch, 0);
|
tty_insert_flip_char(&port->port, ch, 0);
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
goto end_intr;
|
goto end_intr;
|
||||||
|
@ -2118,7 +2118,7 @@ intr_old:
|
||||||
} else
|
} else
|
||||||
flag = TTY_BREAK;
|
flag = TTY_BREAK;
|
||||||
}
|
}
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(&port->port, ch, flag);
|
||||||
cnt++;
|
cnt++;
|
||||||
if (cnt >= recv_room) {
|
if (cnt >= recv_room) {
|
||||||
if (!port->ldisc_stop_rx)
|
if (!port->ldisc_stop_rx)
|
||||||
|
|
|
@ -1070,9 +1070,9 @@ static void gsm_process_modem(struct tty_struct *tty, struct gsm_dlci *dlci,
|
||||||
if ((mlines & TIOCM_CD) == 0 && (dlci->modem_rx & TIOCM_CD))
|
if ((mlines & TIOCM_CD) == 0 && (dlci->modem_rx & TIOCM_CD))
|
||||||
if (!(tty->termios.c_cflag & CLOCAL))
|
if (!(tty->termios.c_cflag & CLOCAL))
|
||||||
tty_hangup(tty);
|
tty_hangup(tty);
|
||||||
if (brk & 0x01)
|
|
||||||
tty_insert_flip_char(tty, 0, TTY_BREAK);
|
|
||||||
}
|
}
|
||||||
|
if (brk & 0x01)
|
||||||
|
tty_insert_flip_char(&dlci->port, 0, TTY_BREAK);
|
||||||
dlci->modem_rx = mlines;
|
dlci->modem_rx = mlines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1140,6 +1140,7 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen)
|
||||||
|
|
||||||
static void gsm_control_rls(struct gsm_mux *gsm, u8 *data, int clen)
|
static void gsm_control_rls(struct gsm_mux *gsm, u8 *data, int clen)
|
||||||
{
|
{
|
||||||
|
struct tty_port *port;
|
||||||
struct tty_struct *tty;
|
struct tty_struct *tty;
|
||||||
unsigned int addr = 0 ;
|
unsigned int addr = 0 ;
|
||||||
u8 bits;
|
u8 bits;
|
||||||
|
@ -1163,16 +1164,19 @@ static void gsm_control_rls(struct gsm_mux *gsm, u8 *data, int clen)
|
||||||
bits = *dp;
|
bits = *dp;
|
||||||
if ((bits & 1) == 0)
|
if ((bits & 1) == 0)
|
||||||
return;
|
return;
|
||||||
/* See if we have an uplink tty */
|
|
||||||
tty = tty_port_tty_get(&gsm->dlci[addr]->port);
|
|
||||||
|
|
||||||
|
port = &gsm->dlci[addr]->port;
|
||||||
|
|
||||||
|
if (bits & 2)
|
||||||
|
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||||
|
if (bits & 4)
|
||||||
|
tty_insert_flip_char(port, 0, TTY_PARITY);
|
||||||
|
if (bits & 8)
|
||||||
|
tty_insert_flip_char(port, 0, TTY_FRAME);
|
||||||
|
|
||||||
|
/* See if we have an uplink tty */
|
||||||
|
tty = tty_port_tty_get(port);
|
||||||
if (tty) {
|
if (tty) {
|
||||||
if (bits & 2)
|
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
|
||||||
if (bits & 4)
|
|
||||||
tty_insert_flip_char(tty, 0, TTY_PARITY);
|
|
||||||
if (bits & 8)
|
|
||||||
tty_insert_flip_char(tty, 0, TTY_FRAME);
|
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
tty_kref_put(tty);
|
tty_kref_put(tty);
|
||||||
}
|
}
|
||||||
|
|
|
@ -855,7 +855,7 @@ static int receive_data(enum port_type index, struct nozomi *dc)
|
||||||
read_mem32((u32 *) buf, addr + offset, RECEIVE_BUF_MAX);
|
read_mem32((u32 *) buf, addr + offset, RECEIVE_BUF_MAX);
|
||||||
|
|
||||||
if (size == 1) {
|
if (size == 1) {
|
||||||
tty_insert_flip_char(tty, buf[0], TTY_NORMAL);
|
tty_insert_flip_char(&port->port, buf[0], TTY_NORMAL);
|
||||||
size = 0;
|
size = 0;
|
||||||
} else if (size < RECEIVE_BUF_MAX) {
|
} else if (size < RECEIVE_BUF_MAX) {
|
||||||
size -= tty_insert_flip_string(tty, (char *) buf, size);
|
size -= tty_insert_flip_string(tty, (char *) buf, size);
|
||||||
|
|
|
@ -379,7 +379,8 @@ static void rp_do_receive(struct r_port *info,
|
||||||
flag = TTY_OVERRUN;
|
flag = TTY_OVERRUN;
|
||||||
else
|
else
|
||||||
flag = TTY_NORMAL;
|
flag = TTY_NORMAL;
|
||||||
tty_insert_flip_char(tty, CharNStat & 0xff, flag);
|
tty_insert_flip_char(&info->port, CharNStat & 0xff,
|
||||||
|
flag);
|
||||||
ToRecv--;
|
ToRecv--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -305,7 +305,7 @@ static void receive_chars(struct m68k_serial *info, struct tty_struct *tty,
|
||||||
else if (rx & URX_FRAME_ERROR)
|
else if (rx & URX_FRAME_ERROR)
|
||||||
flag = TTY_FRAME;
|
flag = TTY_FRAME;
|
||||||
|
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(&info->tport, ch, flag);
|
||||||
#ifndef CONFIG_XCOPILOT_BUGS
|
#ifndef CONFIG_XCOPILOT_BUGS
|
||||||
} while((rx = uart->urx.w) & URX_DATA_READY);
|
} while((rx = uart->urx.w) & URX_DATA_READY);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -297,10 +297,11 @@ static void ar933x_uart_set_termios(struct uart_port *port,
|
||||||
|
|
||||||
static void ar933x_uart_rx_chars(struct ar933x_uart_port *up)
|
static void ar933x_uart_rx_chars(struct ar933x_uart_port *up)
|
||||||
{
|
{
|
||||||
|
struct tty_port *port = &up->port.state->port;
|
||||||
struct tty_struct *tty;
|
struct tty_struct *tty;
|
||||||
int max_count = 256;
|
int max_count = 256;
|
||||||
|
|
||||||
tty = tty_port_tty_get(&up->port.state->port);
|
tty = tty_port_tty_get(port);
|
||||||
do {
|
do {
|
||||||
unsigned int rdata;
|
unsigned int rdata;
|
||||||
unsigned char ch;
|
unsigned char ch;
|
||||||
|
@ -313,11 +314,6 @@ static void ar933x_uart_rx_chars(struct ar933x_uart_port *up)
|
||||||
ar933x_uart_write(up, AR933X_UART_DATA_REG,
|
ar933x_uart_write(up, AR933X_UART_DATA_REG,
|
||||||
AR933X_UART_DATA_RX_CSR);
|
AR933X_UART_DATA_RX_CSR);
|
||||||
|
|
||||||
if (!tty) {
|
|
||||||
/* discard the data if no tty available */
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
up->port.icount.rx++;
|
up->port.icount.rx++;
|
||||||
ch = rdata & AR933X_UART_DATA_TX_RX_MASK;
|
ch = rdata & AR933X_UART_DATA_TX_RX_MASK;
|
||||||
|
|
||||||
|
@ -325,7 +321,7 @@ static void ar933x_uart_rx_chars(struct ar933x_uart_port *up)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((up->port.ignore_status_mask & AR933X_DUMMY_STATUS_RD) == 0)
|
if ((up->port.ignore_status_mask & AR933X_DUMMY_STATUS_RD) == 0)
|
||||||
tty_insert_flip_char(tty, ch, TTY_NORMAL);
|
tty_insert_flip_char(port, ch, TTY_NORMAL);
|
||||||
} while (max_count-- > 0);
|
} while (max_count-- > 0);
|
||||||
|
|
||||||
if (tty) {
|
if (tty) {
|
||||||
|
|
|
@ -235,6 +235,7 @@ static const char *bcm_uart_type(struct uart_port *port)
|
||||||
*/
|
*/
|
||||||
static void bcm_uart_do_rx(struct uart_port *port)
|
static void bcm_uart_do_rx(struct uart_port *port)
|
||||||
{
|
{
|
||||||
|
struct tty_port *port = &port->state->port;
|
||||||
struct tty_struct *tty;
|
struct tty_struct *tty;
|
||||||
unsigned int max_count;
|
unsigned int max_count;
|
||||||
|
|
||||||
|
@ -242,7 +243,7 @@ static void bcm_uart_do_rx(struct uart_port *port)
|
||||||
* higher than fifo size anyway since we're much faster than
|
* higher than fifo size anyway since we're much faster than
|
||||||
* serial port */
|
* serial port */
|
||||||
max_count = 32;
|
max_count = 32;
|
||||||
tty = port->state->port.tty;
|
tty = port->tty;
|
||||||
do {
|
do {
|
||||||
unsigned int iestat, c, cstat;
|
unsigned int iestat, c, cstat;
|
||||||
char flag;
|
char flag;
|
||||||
|
@ -261,7 +262,7 @@ static void bcm_uart_do_rx(struct uart_port *port)
|
||||||
bcm_uart_writel(port, val, UART_CTL_REG);
|
bcm_uart_writel(port, val, UART_CTL_REG);
|
||||||
|
|
||||||
port->icount.overrun++;
|
port->icount.overrun++;
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(iestat & UART_IR_STAT(UART_IR_RXNOTEMPTY)))
|
if (!(iestat & UART_IR_STAT(UART_IR_RXNOTEMPTY)))
|
||||||
|
@ -300,7 +301,7 @@ static void bcm_uart_do_rx(struct uart_port *port)
|
||||||
|
|
||||||
|
|
||||||
if ((cstat & port->ignore_status_mask) == 0)
|
if ((cstat & port->ignore_status_mask) == 0)
|
||||||
tty_insert_flip_char(tty, c, flag);
|
tty_insert_flip_char(port, c, flag);
|
||||||
|
|
||||||
} while (--max_count);
|
} while (--max_count);
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,8 @@ static int sport_uart_setup(struct sport_uart_port *up, int size, int baud_rate)
|
||||||
static irqreturn_t sport_uart_rx_irq(int irq, void *dev_id)
|
static irqreturn_t sport_uart_rx_irq(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct sport_uart_port *up = dev_id;
|
struct sport_uart_port *up = dev_id;
|
||||||
struct tty_struct *tty = up->port.state->port.tty;
|
struct tty_port *port = &up->port.state->port;
|
||||||
|
struct tty_struct *tty = tport->tty;
|
||||||
unsigned int ch;
|
unsigned int ch;
|
||||||
|
|
||||||
spin_lock(&up->port.lock);
|
spin_lock(&up->port.lock);
|
||||||
|
@ -159,7 +160,7 @@ static irqreturn_t sport_uart_rx_irq(int irq, void *dev_id)
|
||||||
up->port.icount.rx++;
|
up->port.icount.rx++;
|
||||||
|
|
||||||
if (!uart_handle_sysrq_char(&up->port, ch))
|
if (!uart_handle_sysrq_char(&up->port, ch))
|
||||||
tty_insert_flip_char(tty, ch, TTY_NORMAL);
|
tty_insert_flip_char(port, ch, TTY_NORMAL);
|
||||||
}
|
}
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
|
||||||
|
@ -182,7 +183,6 @@ static irqreturn_t sport_uart_tx_irq(int irq, void *dev_id)
|
||||||
static irqreturn_t sport_uart_err_irq(int irq, void *dev_id)
|
static irqreturn_t sport_uart_err_irq(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct sport_uart_port *up = dev_id;
|
struct sport_uart_port *up = dev_id;
|
||||||
struct tty_struct *tty = up->port.state->port.tty;
|
|
||||||
unsigned int stat = SPORT_GET_STAT(up);
|
unsigned int stat = SPORT_GET_STAT(up);
|
||||||
|
|
||||||
spin_lock(&up->port.lock);
|
spin_lock(&up->port.lock);
|
||||||
|
@ -190,7 +190,7 @@ static irqreturn_t sport_uart_err_irq(int irq, void *dev_id)
|
||||||
/* Overflow in RX FIFO */
|
/* Overflow in RX FIFO */
|
||||||
if (stat & ROVF) {
|
if (stat & ROVF) {
|
||||||
up->port.icount.overrun++;
|
up->port.icount.overrun++;
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(&up->port.state->port, 0, TTY_OVERRUN);
|
||||||
SPORT_PUT_STAT(up, ROVF); /* Clear ROVF bit */
|
SPORT_PUT_STAT(up, ROVF); /* Clear ROVF bit */
|
||||||
}
|
}
|
||||||
/* These should not happen */
|
/* These should not happen */
|
||||||
|
@ -205,6 +205,8 @@ static irqreturn_t sport_uart_err_irq(int irq, void *dev_id)
|
||||||
SSYNC();
|
SSYNC();
|
||||||
|
|
||||||
spin_unlock(&up->port.lock);
|
spin_unlock(&up->port.lock);
|
||||||
|
/* XXX we don't push the overrun bit to TTY? */
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,7 @@ static void cpm_uart_int_rx(struct uart_port *port)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
error_return:
|
error_return:
|
||||||
tty_insert_flip_char(tty, ch, flg);
|
tty_insert_flip_char(tport, ch, flg);
|
||||||
|
|
||||||
} /* End while (i--) */
|
} /* End while (i--) */
|
||||||
|
|
||||||
|
|
|
@ -1760,8 +1760,7 @@ add_char_and_flag(struct e100_serial *info, unsigned char data, unsigned char fl
|
||||||
|
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
} else {
|
} else {
|
||||||
struct tty_struct *tty = info->port.tty;
|
tty_insert_flip_char(&info->port, data, flag);
|
||||||
tty_insert_flip_char(tty, data, flag);
|
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2338,8 +2337,7 @@ more_data:
|
||||||
data_in, data_read);
|
data_in, data_read);
|
||||||
char flag = TTY_NORMAL;
|
char flag = TTY_NORMAL;
|
||||||
if (info->errorcode == ERRCODE_INSERT_BREAK) {
|
if (info->errorcode == ERRCODE_INSERT_BREAK) {
|
||||||
struct tty_struct *tty = info->port.tty;
|
tty_insert_flip_char(&info->port, 0, flag);
|
||||||
tty_insert_flip_char(tty, 0, flag);
|
|
||||||
info->icount.rx++;
|
info->icount.rx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2353,7 +2351,7 @@ more_data:
|
||||||
info->icount.frame++;
|
info->icount.frame++;
|
||||||
flag = TTY_FRAME;
|
flag = TTY_FRAME;
|
||||||
}
|
}
|
||||||
tty_insert_flip_char(tty, data, flag);
|
tty_insert_flip_char(&info->port, data, flag);
|
||||||
info->errorcode = 0;
|
info->errorcode = 0;
|
||||||
}
|
}
|
||||||
info->break_detected_cnt = 0;
|
info->break_detected_cnt = 0;
|
||||||
|
@ -2369,7 +2367,7 @@ more_data:
|
||||||
log_int(rdpc(), 0, 0);
|
log_int(rdpc(), 0, 0);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
tty_insert_flip_char(tty,
|
tty_insert_flip_char(&info->port,
|
||||||
IO_EXTRACT(R_SERIAL0_READ, data_in, data_read),
|
IO_EXTRACT(R_SERIAL0_READ, data_in, data_read),
|
||||||
TTY_NORMAL);
|
TTY_NORMAL);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -194,8 +194,7 @@ static void efm32_uart_break_ctl(struct uart_port *port, int ctl)
|
||||||
/* not possible without fiddling with gpios */
|
/* not possible without fiddling with gpios */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void efm32_uart_rx_chars(struct efm32_uart_port *efm_port,
|
static void efm32_uart_rx_chars(struct efm32_uart_port *efm_port)
|
||||||
struct tty_struct *tty)
|
|
||||||
{
|
{
|
||||||
struct uart_port *port = &efm_port->port;
|
struct uart_port *port = &efm_port->port;
|
||||||
|
|
||||||
|
@ -237,8 +236,8 @@ static void efm32_uart_rx_chars(struct efm32_uart_port *efm_port,
|
||||||
rxdata & UARTn_RXDATAX_RXDATA__MASK))
|
rxdata & UARTn_RXDATAX_RXDATA__MASK))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (tty && (rxdata & port->ignore_status_mask) == 0)
|
if ((rxdata & port->ignore_status_mask) == 0)
|
||||||
tty_insert_flip_char(tty,
|
tty_insert_flip_char(&port->state->port,
|
||||||
rxdata & UARTn_RXDATAX_RXDATA__MASK, flag);
|
rxdata & UARTn_RXDATAX_RXDATA__MASK, flag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -249,15 +248,16 @@ static irqreturn_t efm32_uart_rxirq(int irq, void *data)
|
||||||
u32 irqflag = efm32_uart_read32(efm_port, UARTn_IF);
|
u32 irqflag = efm32_uart_read32(efm_port, UARTn_IF);
|
||||||
int handled = IRQ_NONE;
|
int handled = IRQ_NONE;
|
||||||
struct uart_port *port = &efm_port->port;
|
struct uart_port *port = &efm_port->port;
|
||||||
|
struct tty_port *tport = &port->state->port;
|
||||||
struct tty_struct *tty;
|
struct tty_struct *tty;
|
||||||
|
|
||||||
spin_lock(&port->lock);
|
spin_lock(&port->lock);
|
||||||
|
|
||||||
tty = tty_kref_get(port->state->port.tty);
|
tty = tty_kref_get(tport->tty);
|
||||||
|
|
||||||
if (irqflag & UARTn_IF_RXDATAV) {
|
if (irqflag & UARTn_IF_RXDATAV) {
|
||||||
efm32_uart_write32(efm_port, UARTn_IF_RXDATAV, UARTn_IFC);
|
efm32_uart_write32(efm_port, UARTn_IF_RXDATAV, UARTn_IFC);
|
||||||
efm32_uart_rx_chars(efm_port, tty);
|
efm32_uart_rx_chars(efm_port);
|
||||||
|
|
||||||
handled = IRQ_HANDLED;
|
handled = IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
@ -265,8 +265,7 @@ static irqreturn_t efm32_uart_rxirq(int irq, void *data)
|
||||||
if (irqflag & UARTn_IF_RXOF) {
|
if (irqflag & UARTn_IF_RXOF) {
|
||||||
efm32_uart_write32(efm_port, UARTn_IF_RXOF, UARTn_IFC);
|
efm32_uart_write32(efm_port, UARTn_IF_RXOF, UARTn_IFC);
|
||||||
port->icount.overrun++;
|
port->icount.overrun++;
|
||||||
if (tty)
|
tty_insert_flip_char(tport, 0, TTY_OVERRUN);
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
|
||||||
|
|
||||||
handled = IRQ_HANDLED;
|
handled = IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -734,7 +734,8 @@ static void xmit_interrupt(u16 port_int_reg, struct icom_port *icom_port)
|
||||||
static void recv_interrupt(u16 port_int_reg, struct icom_port *icom_port)
|
static void recv_interrupt(u16 port_int_reg, struct icom_port *icom_port)
|
||||||
{
|
{
|
||||||
short int count, rcv_buff;
|
short int count, rcv_buff;
|
||||||
struct tty_struct *tty = icom_port->uart_port.state->port.tty;
|
struct tty_port *port = &icom_port->uart_port.state->port;
|
||||||
|
struct tty_struct *tty = port->tty;
|
||||||
unsigned short int status;
|
unsigned short int status;
|
||||||
struct uart_icount *icount;
|
struct uart_icount *icount;
|
||||||
unsigned long offset;
|
unsigned long offset;
|
||||||
|
@ -812,7 +813,7 @@ static void recv_interrupt(u16 port_int_reg, struct icom_port *icom_port)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tty_insert_flip_char(tty, *(icom_port->recv_buf + offset + count - 1), flag);
|
tty_insert_flip_char(port, *(icom_port->recv_buf + offset + count - 1), flag);
|
||||||
|
|
||||||
if (status & SA_FLAGS_OVERRUN)
|
if (status & SA_FLAGS_OVERRUN)
|
||||||
/*
|
/*
|
||||||
|
@ -820,7 +821,7 @@ static void recv_interrupt(u16 port_int_reg, struct icom_port *icom_port)
|
||||||
* reported immediately, and doesn't
|
* reported immediately, and doesn't
|
||||||
* affect the current character
|
* affect the current character
|
||||||
*/
|
*/
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||||
ignore_char:
|
ignore_char:
|
||||||
icom_port->statStg->rcv[rcv_buff].flags = 0;
|
icom_port->statStg->rcv[rcv_buff].flags = 0;
|
||||||
icom_port->statStg->rcv[rcv_buff].leLength = 0;
|
icom_port->statStg->rcv[rcv_buff].leLength = 0;
|
||||||
|
|
|
@ -517,6 +517,8 @@ static irqreturn_t imx_rxint(int irq, void *dev_id)
|
||||||
struct imx_port *sport = dev_id;
|
struct imx_port *sport = dev_id;
|
||||||
unsigned int rx, flg, ignored = 0;
|
unsigned int rx, flg, ignored = 0;
|
||||||
struct tty_struct *tty = sport->port.state->port.tty;
|
struct tty_struct *tty = sport->port.state->port.tty;
|
||||||
|
struct tty_port *port = &sport->port.state->port;
|
||||||
|
struct tty_struct *tty = port->tty;
|
||||||
unsigned long flags, temp;
|
unsigned long flags, temp;
|
||||||
|
|
||||||
spin_lock_irqsave(&sport->port.lock, flags);
|
spin_lock_irqsave(&sport->port.lock, flags);
|
||||||
|
@ -569,7 +571,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
tty_insert_flip_char(tty, rx, flg);
|
tty_insert_flip_char(port, rx, flg);
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
|
@ -631,13 +631,13 @@ void jsm_input(struct jsm_channel *ch)
|
||||||
* format it likes.
|
* format it likes.
|
||||||
*/
|
*/
|
||||||
if (*(ch->ch_equeue +tail +i) & UART_LSR_BI)
|
if (*(ch->ch_equeue +tail +i) & UART_LSR_BI)
|
||||||
tty_insert_flip_char(tp, *(ch->ch_rqueue +tail +i), TTY_BREAK);
|
tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_BREAK);
|
||||||
else if (*(ch->ch_equeue +tail +i) & UART_LSR_PE)
|
else if (*(ch->ch_equeue +tail +i) & UART_LSR_PE)
|
||||||
tty_insert_flip_char(tp, *(ch->ch_rqueue +tail +i), TTY_PARITY);
|
tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_PARITY);
|
||||||
else if (*(ch->ch_equeue +tail +i) & UART_LSR_FE)
|
else if (*(ch->ch_equeue +tail +i) & UART_LSR_FE)
|
||||||
tty_insert_flip_char(tp, *(ch->ch_rqueue +tail +i), TTY_FRAME);
|
tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_FRAME);
|
||||||
else
|
else
|
||||||
tty_insert_flip_char(tp, *(ch->ch_rqueue +tail +i), TTY_NORMAL);
|
tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_NORMAL);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tty_insert_flip_string(tp, ch->ch_rqueue + tail, s) ;
|
tty_insert_flip_string(tp, ch->ch_rqueue + tail, s) ;
|
||||||
|
|
|
@ -216,7 +216,7 @@ static void kgdb_nmi_tty_receiver(unsigned long data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while (kfifo_out(&priv->fifo, &ch, 1))
|
while (kfifo_out(&priv->fifo, &ch, 1))
|
||||||
tty_insert_flip_char(priv->port.tty, ch, TTY_NORMAL);
|
tty_insert_flip_char(&priv->port, ch, TTY_NORMAL);
|
||||||
tty_flip_buffer_push(priv->port.tty);
|
tty_flip_buffer_push(priv->port.tty);
|
||||||
|
|
||||||
tty_kref_put(tty);
|
tty_kref_put(tty);
|
||||||
|
|
|
@ -162,7 +162,8 @@ lqasc_enable_ms(struct uart_port *port)
|
||||||
static int
|
static int
|
||||||
lqasc_rx_chars(struct uart_port *port)
|
lqasc_rx_chars(struct uart_port *port)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = tty_port_tty_get(&port->state->port);
|
struct tty_port *tport = &port->state->port;
|
||||||
|
struct tty_struct *tty = tty_port_tty_get(tport);
|
||||||
unsigned int ch = 0, rsr = 0, fifocnt;
|
unsigned int ch = 0, rsr = 0, fifocnt;
|
||||||
|
|
||||||
if (!tty) {
|
if (!tty) {
|
||||||
|
@ -208,7 +209,7 @@ lqasc_rx_chars(struct uart_port *port)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((rsr & port->ignore_status_mask) == 0)
|
if ((rsr & port->ignore_status_mask) == 0)
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(tport, ch, flag);
|
||||||
|
|
||||||
if (rsr & ASCSTATE_ROE)
|
if (rsr & ASCSTATE_ROE)
|
||||||
/*
|
/*
|
||||||
|
@ -216,7 +217,7 @@ lqasc_rx_chars(struct uart_port *port)
|
||||||
* immediately, and doesn't affect the current
|
* immediately, and doesn't affect the current
|
||||||
* character
|
* character
|
||||||
*/
|
*/
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(tport, 0, TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
if (ch != 0)
|
if (ch != 0)
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
|
|
@ -257,8 +257,9 @@ static void __serial_uart_flush(struct uart_port *port)
|
||||||
|
|
||||||
static void __serial_lpc32xx_rx(struct uart_port *port)
|
static void __serial_lpc32xx_rx(struct uart_port *port)
|
||||||
{
|
{
|
||||||
|
struct tty_port *tport = &port->state->port;
|
||||||
unsigned int tmp, flag;
|
unsigned int tmp, flag;
|
||||||
struct tty_struct *tty = tty_port_tty_get(&port->state->port);
|
struct tty_struct *tty = tty_port_tty_get(tport);
|
||||||
|
|
||||||
if (!tty) {
|
if (!tty) {
|
||||||
/* Discard data: no tty available */
|
/* Discard data: no tty available */
|
||||||
|
@ -281,10 +282,10 @@ static void __serial_lpc32xx_rx(struct uart_port *port)
|
||||||
LPC32XX_HSUART_IIR(port->membase));
|
LPC32XX_HSUART_IIR(port->membase));
|
||||||
port->icount.frame++;
|
port->icount.frame++;
|
||||||
flag = TTY_FRAME;
|
flag = TTY_FRAME;
|
||||||
tty_insert_flip_char(tty, 0, TTY_FRAME);
|
tty_insert_flip_char(tport, 0, TTY_FRAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
tty_insert_flip_char(tty, (tmp & 0xFF), flag);
|
tty_insert_flip_char(tport, (tmp & 0xFF), flag);
|
||||||
|
|
||||||
tmp = readl(LPC32XX_HSUART_FIFO(port->membase));
|
tmp = readl(LPC32XX_HSUART_FIFO(port->membase));
|
||||||
}
|
}
|
||||||
|
@ -332,7 +333,8 @@ exit_tx:
|
||||||
static irqreturn_t serial_lpc32xx_interrupt(int irq, void *dev_id)
|
static irqreturn_t serial_lpc32xx_interrupt(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct uart_port *port = dev_id;
|
struct uart_port *port = dev_id;
|
||||||
struct tty_struct *tty = tty_port_tty_get(&port->state->port);
|
struct tty_port *port = &port->state->port;
|
||||||
|
struct tty_struct *tty = tty_port_tty_get(tport);
|
||||||
u32 status;
|
u32 status;
|
||||||
|
|
||||||
spin_lock(&port->lock);
|
spin_lock(&port->lock);
|
||||||
|
@ -356,8 +358,8 @@ static irqreturn_t serial_lpc32xx_interrupt(int irq, void *dev_id)
|
||||||
writel(LPC32XX_HSU_RX_OE_INT,
|
writel(LPC32XX_HSU_RX_OE_INT,
|
||||||
LPC32XX_HSUART_IIR(port->membase));
|
LPC32XX_HSUART_IIR(port->membase));
|
||||||
port->icount.overrun++;
|
port->icount.overrun++;
|
||||||
|
tty_insert_flip_char(tport, 0, TTY_OVERRUN);
|
||||||
if (tty) {
|
if (tty) {
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
|
||||||
tty_schedule_flip(tty);
|
tty_schedule_flip(tty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,7 +300,8 @@ static void m32r_sio_enable_ms(struct uart_port *port)
|
||||||
|
|
||||||
static void receive_chars(struct uart_sio_port *up, int *status)
|
static void receive_chars(struct uart_sio_port *up, int *status)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = up->port.state->port.tty;
|
struct tty_port *port = &up->port.state->port;
|
||||||
|
struct tty_struct *tty = tport->tty;
|
||||||
unsigned char ch;
|
unsigned char ch;
|
||||||
unsigned char flag;
|
unsigned char flag;
|
||||||
int max_count = 256;
|
int max_count = 256;
|
||||||
|
@ -355,7 +356,7 @@ static void receive_chars(struct uart_sio_port *up, int *status)
|
||||||
if (uart_handle_sysrq_char(&up->port, ch))
|
if (uart_handle_sysrq_char(&up->port, ch))
|
||||||
goto ignore_char;
|
goto ignore_char;
|
||||||
if ((*status & up->port.ignore_status_mask) == 0)
|
if ((*status & up->port.ignore_status_mask) == 0)
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(port, ch, flag);
|
||||||
|
|
||||||
if (*status & UART_LSR_OE) {
|
if (*status & UART_LSR_OE) {
|
||||||
/*
|
/*
|
||||||
|
@ -363,7 +364,7 @@ static void receive_chars(struct uart_sio_port *up, int *status)
|
||||||
* immediately, and doesn't affect the current
|
* immediately, and doesn't affect the current
|
||||||
* character.
|
* character.
|
||||||
*/
|
*/
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
ignore_char:
|
ignore_char:
|
||||||
*status = serial_in(up, UART_LSR);
|
*status = serial_in(up, UART_LSR);
|
||||||
|
|
|
@ -941,7 +941,8 @@ static struct uart_ops mpc52xx_uart_ops = {
|
||||||
static inline int
|
static inline int
|
||||||
mpc52xx_uart_int_rx_chars(struct uart_port *port)
|
mpc52xx_uart_int_rx_chars(struct uart_port *port)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = port->state->port.tty;
|
struct tty_port *tport = &port->state->port;
|
||||||
|
struct tty_struct *tty = tport->tty;
|
||||||
unsigned char ch, flag;
|
unsigned char ch, flag;
|
||||||
unsigned short status;
|
unsigned short status;
|
||||||
|
|
||||||
|
@ -986,14 +987,14 @@ mpc52xx_uart_int_rx_chars(struct uart_port *port)
|
||||||
out_8(&PSC(port)->command, MPC52xx_PSC_RST_ERR_STAT);
|
out_8(&PSC(port)->command, MPC52xx_PSC_RST_ERR_STAT);
|
||||||
|
|
||||||
}
|
}
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(tport, ch, flag);
|
||||||
if (status & MPC52xx_PSC_SR_OE) {
|
if (status & MPC52xx_PSC_SR_OE) {
|
||||||
/*
|
/*
|
||||||
* Overrun is special, since it's
|
* Overrun is special, since it's
|
||||||
* reported immediately, and doesn't
|
* reported immediately, and doesn't
|
||||||
* affect the current character
|
* affect the current character
|
||||||
*/
|
*/
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(tport, 0, TTY_OVERRUN);
|
||||||
port->icount.overrun++;
|
port->icount.overrun++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1040,10 +1040,10 @@ static int mpsc_rx_intr(struct mpsc_port_info *pi)
|
||||||
| SDMA_DESC_CMDSTAT_FR
|
| SDMA_DESC_CMDSTAT_FR
|
||||||
| SDMA_DESC_CMDSTAT_OR)))
|
| SDMA_DESC_CMDSTAT_OR)))
|
||||||
&& !(cmdstat & pi->port.ignore_status_mask)) {
|
&& !(cmdstat & pi->port.ignore_status_mask)) {
|
||||||
tty_insert_flip_char(tty, *bp, flag);
|
tty_insert_flip_char(port, *bp, flag);
|
||||||
} else {
|
} else {
|
||||||
for (i=0; i<bytes_in; i++)
|
for (i=0; i<bytes_in; i++)
|
||||||
tty_insert_flip_char(tty, *bp++, TTY_NORMAL);
|
tty_insert_flip_char(port, *bp++, TTY_NORMAL);
|
||||||
|
|
||||||
pi->port.icount.rx += bytes_in;
|
pi->port.icount.rx += bytes_in;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,14 +91,15 @@ static void msm_enable_ms(struct uart_port *port)
|
||||||
|
|
||||||
static void handle_rx_dm(struct uart_port *port, unsigned int misr)
|
static void handle_rx_dm(struct uart_port *port, unsigned int misr)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = port->state->port.tty;
|
struct tty_port *tport = &port->state->port;
|
||||||
|
struct tty_struct *tty = tport->tty;
|
||||||
unsigned int sr;
|
unsigned int sr;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
struct msm_port *msm_port = UART_TO_MSM(port);
|
struct msm_port *msm_port = UART_TO_MSM(port);
|
||||||
|
|
||||||
if ((msm_read(port, UART_SR) & UART_SR_OVERRUN)) {
|
if ((msm_read(port, UART_SR) & UART_SR_OVERRUN)) {
|
||||||
port->icount.overrun++;
|
port->icount.overrun++;
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(tport, 0, TTY_OVERRUN);
|
||||||
msm_write(port, UART_CR_CMD_RESET_ERR, UART_CR);
|
msm_write(port, UART_CR_CMD_RESET_ERR, UART_CR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +147,8 @@ static void handle_rx_dm(struct uart_port *port, unsigned int misr)
|
||||||
|
|
||||||
static void handle_rx(struct uart_port *port)
|
static void handle_rx(struct uart_port *port)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = port->state->port.tty;
|
struct tty_port *tport = &port->state->port;
|
||||||
|
struct tty_struct *tty = tport->tty;
|
||||||
unsigned int sr;
|
unsigned int sr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -155,7 +157,7 @@ static void handle_rx(struct uart_port *port)
|
||||||
*/
|
*/
|
||||||
if ((msm_read(port, UART_SR) & UART_SR_OVERRUN)) {
|
if ((msm_read(port, UART_SR) & UART_SR_OVERRUN)) {
|
||||||
port->icount.overrun++;
|
port->icount.overrun++;
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(tport, 0, TTY_OVERRUN);
|
||||||
msm_write(port, UART_CR_CMD_RESET_ERR, UART_CR);
|
msm_write(port, UART_CR_CMD_RESET_ERR, UART_CR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +188,7 @@ static void handle_rx(struct uart_port *port)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!uart_handle_sysrq_char(port, c))
|
if (!uart_handle_sysrq_char(port, c))
|
||||||
tty_insert_flip_char(tty, c, flag);
|
tty_insert_flip_char(tport, c, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
|
|
@ -908,6 +908,7 @@ static void msm_hs_dmov_rx_callback(struct msm_dmov_cmd *cmd_ptr,
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned int flush;
|
unsigned int flush;
|
||||||
struct tty_struct *tty;
|
struct tty_struct *tty;
|
||||||
|
struct tty_port *port;
|
||||||
struct uart_port *uport;
|
struct uart_port *uport;
|
||||||
struct msm_hs_port *msm_uport;
|
struct msm_hs_port *msm_uport;
|
||||||
|
|
||||||
|
@ -917,7 +918,8 @@ static void msm_hs_dmov_rx_callback(struct msm_dmov_cmd *cmd_ptr,
|
||||||
spin_lock_irqsave(&uport->lock, flags);
|
spin_lock_irqsave(&uport->lock, flags);
|
||||||
clk_enable(msm_uport->clk);
|
clk_enable(msm_uport->clk);
|
||||||
|
|
||||||
tty = uport->state->port.tty;
|
port = &uport->state->port;
|
||||||
|
tty = port->tty;
|
||||||
|
|
||||||
msm_hs_write(uport, UARTDM_CR_ADDR, STALE_EVENT_DISABLE);
|
msm_hs_write(uport, UARTDM_CR_ADDR, STALE_EVENT_DISABLE);
|
||||||
|
|
||||||
|
@ -926,7 +928,7 @@ static void msm_hs_dmov_rx_callback(struct msm_dmov_cmd *cmd_ptr,
|
||||||
/* overflow is not connect to data in a FIFO */
|
/* overflow is not connect to data in a FIFO */
|
||||||
if (unlikely((status & UARTDM_SR_OVERRUN_BMSK) &&
|
if (unlikely((status & UARTDM_SR_OVERRUN_BMSK) &&
|
||||||
(uport->read_status_mask & CREAD))) {
|
(uport->read_status_mask & CREAD))) {
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||||
uport->icount.buf_overrun++;
|
uport->icount.buf_overrun++;
|
||||||
error_f = 1;
|
error_f = 1;
|
||||||
}
|
}
|
||||||
|
@ -939,7 +941,7 @@ static void msm_hs_dmov_rx_callback(struct msm_dmov_cmd *cmd_ptr,
|
||||||
uport->icount.parity++;
|
uport->icount.parity++;
|
||||||
error_f = 1;
|
error_f = 1;
|
||||||
if (uport->ignore_status_mask & IGNPAR)
|
if (uport->ignore_status_mask & IGNPAR)
|
||||||
tty_insert_flip_char(tty, 0, TTY_PARITY);
|
tty_insert_flip_char(port, 0, TTY_PARITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error_f)
|
if (error_f)
|
||||||
|
@ -1344,7 +1346,6 @@ static irqreturn_t msm_hs_rx_wakeup_isr(int irq, void *dev)
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct msm_hs_port *msm_uport = dev;
|
struct msm_hs_port *msm_uport = dev;
|
||||||
struct uart_port *uport = &msm_uport->uport;
|
struct uart_port *uport = &msm_uport->uport;
|
||||||
struct tty_struct *tty = NULL;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&uport->lock, flags);
|
spin_lock_irqsave(&uport->lock, flags);
|
||||||
if (msm_uport->clk_state == MSM_HS_CLK_OFF) {
|
if (msm_uport->clk_state == MSM_HS_CLK_OFF) {
|
||||||
|
@ -1361,8 +1362,7 @@ static irqreturn_t msm_hs_rx_wakeup_isr(int irq, void *dev)
|
||||||
* optionally inject char into tty rx */
|
* optionally inject char into tty rx */
|
||||||
msm_hs_request_clock_on_locked(uport);
|
msm_hs_request_clock_on_locked(uport);
|
||||||
if (msm_uport->rx_wakeup.inject_rx) {
|
if (msm_uport->rx_wakeup.inject_rx) {
|
||||||
tty = uport->state->port.tty;
|
tty_insert_flip_char(&uport->state->port,
|
||||||
tty_insert_flip_char(tty,
|
|
||||||
msm_uport->rx_wakeup.rx_to_inject,
|
msm_uport->rx_wakeup.rx_to_inject,
|
||||||
TTY_NORMAL);
|
TTY_NORMAL);
|
||||||
queue_work(msm_hs_workqueue, &msm_uport->rx.tty_work);
|
queue_work(msm_hs_workqueue, &msm_uport->rx.tty_work);
|
||||||
|
|
|
@ -242,8 +242,9 @@ static void mux_write(struct uart_port *port)
|
||||||
*/
|
*/
|
||||||
static void mux_read(struct uart_port *port)
|
static void mux_read(struct uart_port *port)
|
||||||
{
|
{
|
||||||
|
struct tty_port *tport = &port->state->port;
|
||||||
int data;
|
int data;
|
||||||
struct tty_struct *tty = port->state->port.tty;
|
struct tty_struct *tty = tport->tty;
|
||||||
__u32 start_count = port->icount.rx;
|
__u32 start_count = port->icount.rx;
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
@ -266,7 +267,7 @@ static void mux_read(struct uart_port *port)
|
||||||
if (uart_handle_sysrq_char(port, data & 0xffu))
|
if (uart_handle_sysrq_char(port, data & 0xffu))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
tty_insert_flip_char(tty, data & 0xFF, TTY_NORMAL);
|
tty_insert_flip_char(tport, data & 0xFF, TTY_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (start_count != port->icount.rx) {
|
if (start_count != port->icount.rx) {
|
||||||
|
|
|
@ -128,7 +128,8 @@ static void nwpserial_config_port(struct uart_port *port, int flags)
|
||||||
static irqreturn_t nwpserial_interrupt(int irq, void *dev_id)
|
static irqreturn_t nwpserial_interrupt(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct nwpserial_port *up = dev_id;
|
struct nwpserial_port *up = dev_id;
|
||||||
struct tty_struct *tty = up->port.state->port.tty;
|
struct tty_port *port = &up->port.state->port;
|
||||||
|
struct tty_struct *tty = port->tty;
|
||||||
irqreturn_t ret;
|
irqreturn_t ret;
|
||||||
unsigned int iir;
|
unsigned int iir;
|
||||||
unsigned char ch;
|
unsigned char ch;
|
||||||
|
@ -146,7 +147,7 @@ static irqreturn_t nwpserial_interrupt(int irq, void *dev_id)
|
||||||
up->port.icount.rx++;
|
up->port.icount.rx++;
|
||||||
ch = dcr_read(up->dcr_host, UART_RX);
|
ch = dcr_read(up->dcr_host, UART_RX);
|
||||||
if (up->port.ignore_status_mask != NWPSERIAL_STATUS_RXVALID)
|
if (up->port.ignore_status_mask != NWPSERIAL_STATUS_RXVALID)
|
||||||
tty_insert_flip_char(tty, ch, TTY_NORMAL);
|
tty_insert_flip_char(port, ch, TTY_NORMAL);
|
||||||
} while (dcr_read(up->dcr_host, UART_LSR) & UART_LSR_DR);
|
} while (dcr_read(up->dcr_host, UART_LSR) & UART_LSR_DR);
|
||||||
|
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
|
|
@ -229,6 +229,7 @@ static void pmz_interrupt_control(struct uart_pmac_port *uap, int enable)
|
||||||
|
|
||||||
static struct tty_struct *pmz_receive_chars(struct uart_pmac_port *uap)
|
static struct tty_struct *pmz_receive_chars(struct uart_pmac_port *uap)
|
||||||
{
|
{
|
||||||
|
struct tty_port *port;
|
||||||
struct tty_struct *tty = NULL;
|
struct tty_struct *tty = NULL;
|
||||||
unsigned char ch, r1, drop, error, flag;
|
unsigned char ch, r1, drop, error, flag;
|
||||||
int loops = 0;
|
int loops = 0;
|
||||||
|
@ -239,7 +240,8 @@ static struct tty_struct *pmz_receive_chars(struct uart_pmac_port *uap)
|
||||||
(void)read_zsdata(uap);
|
(void)read_zsdata(uap);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
tty = uap->port.state->port.tty;
|
port = &uap->port.state->port;
|
||||||
|
tty = port->tty; /* TOCTOU above */
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
error = 0;
|
error = 0;
|
||||||
|
@ -309,10 +311,10 @@ static struct tty_struct *pmz_receive_chars(struct uart_pmac_port *uap)
|
||||||
|
|
||||||
if (uap->port.ignore_status_mask == 0xff ||
|
if (uap->port.ignore_status_mask == 0xff ||
|
||||||
(r1 & uap->port.ignore_status_mask) == 0) {
|
(r1 & uap->port.ignore_status_mask) == 0) {
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(port, ch, flag);
|
||||||
}
|
}
|
||||||
if (r1 & Rx_OVR)
|
if (r1 & Rx_OVR)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||||
next_char:
|
next_char:
|
||||||
/* We can get stuck in an infinite loop getting char 0 when the
|
/* We can get stuck in an infinite loop getting char 0 when the
|
||||||
* line is in a wrong HW state, we break that here.
|
* line is in a wrong HW state, we break that here.
|
||||||
|
|
|
@ -138,14 +138,18 @@ static void sc26xx_disable_irq(struct uart_port *port, int mask)
|
||||||
|
|
||||||
static struct tty_struct *receive_chars(struct uart_port *port)
|
static struct tty_struct *receive_chars(struct uart_port *port)
|
||||||
{
|
{
|
||||||
|
struct tty_port *tport = NULL;
|
||||||
struct tty_struct *tty = NULL;
|
struct tty_struct *tty = NULL;
|
||||||
int limit = 10000;
|
int limit = 10000;
|
||||||
unsigned char ch;
|
unsigned char ch;
|
||||||
char flag;
|
char flag;
|
||||||
u8 status;
|
u8 status;
|
||||||
|
|
||||||
if (port->state != NULL) /* Unopened serial console */
|
/* FIXME what is this trying to achieve? */
|
||||||
tty = port->state->port.tty;
|
if (port->state != NULL) { /* Unopened serial console */
|
||||||
|
tport = &port->state->port;
|
||||||
|
tty = tport->tty;
|
||||||
|
}
|
||||||
|
|
||||||
while (limit-- > 0) {
|
while (limit-- > 0) {
|
||||||
status = READ_SC_PORT(port, SR);
|
status = READ_SC_PORT(port, SR);
|
||||||
|
@ -185,7 +189,7 @@ static struct tty_struct *receive_chars(struct uart_port *port)
|
||||||
if (status & port->ignore_status_mask)
|
if (status & port->ignore_status_mask)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(tport, ch, flag);
|
||||||
}
|
}
|
||||||
return tty;
|
return tty;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2792,10 +2792,10 @@ EXPORT_SYMBOL_GPL(uart_handle_cts_change);
|
||||||
void uart_insert_char(struct uart_port *port, unsigned int status,
|
void uart_insert_char(struct uart_port *port, unsigned int status,
|
||||||
unsigned int overrun, unsigned int ch, unsigned int flag)
|
unsigned int overrun, unsigned int ch, unsigned int flag)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = port->state->port.tty;
|
struct tty_port *tport = &port->state->port;
|
||||||
|
|
||||||
if ((status & port->ignore_status_mask & ~overrun) == 0)
|
if ((status & port->ignore_status_mask & ~overrun) == 0)
|
||||||
if (tty_insert_flip_char(tty, ch, flag) == 0)
|
if (tty_insert_flip_char(tport, ch, flag) == 0)
|
||||||
++port->icount.buf_overrun;
|
++port->icount.buf_overrun;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2803,7 +2803,7 @@ void uart_insert_char(struct uart_port *port, unsigned int status,
|
||||||
* it doesn't affect the current character.
|
* it doesn't affect the current character.
|
||||||
*/
|
*/
|
||||||
if (status & ~port->ignore_status_mask & overrun)
|
if (status & ~port->ignore_status_mask & overrun)
|
||||||
if (tty_insert_flip_char(tty, 0, TTY_OVERRUN) == 0)
|
if (tty_insert_flip_char(tport, 0, TTY_OVERRUN) == 0)
|
||||||
++port->icount.buf_overrun;
|
++port->icount.buf_overrun;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(uart_insert_char);
|
EXPORT_SYMBOL_GPL(uart_insert_char);
|
||||||
|
|
|
@ -620,7 +620,7 @@ static void sci_receive_chars(struct uart_port *port)
|
||||||
sci_port->break_flag)
|
sci_port->break_flag)
|
||||||
count = 0;
|
count = 0;
|
||||||
else
|
else
|
||||||
tty_insert_flip_char(tty, c, TTY_NORMAL);
|
tty_insert_flip_char(tport, c, TTY_NORMAL);
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
char c = serial_port_in(port, SCxRDR);
|
char c = serial_port_in(port, SCxRDR);
|
||||||
|
@ -662,7 +662,7 @@ static void sci_receive_chars(struct uart_port *port)
|
||||||
} else
|
} else
|
||||||
flag = TTY_NORMAL;
|
flag = TTY_NORMAL;
|
||||||
|
|
||||||
tty_insert_flip_char(tty, c, flag);
|
tty_insert_flip_char(tport, c, flag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -721,7 +721,8 @@ static int sci_handle_errors(struct uart_port *port)
|
||||||
{
|
{
|
||||||
int copied = 0;
|
int copied = 0;
|
||||||
unsigned short status = serial_port_in(port, SCxSR);
|
unsigned short status = serial_port_in(port, SCxSR);
|
||||||
struct tty_struct *tty = port->state->port.tty;
|
struct tty_port *tport = &port->state->port;
|
||||||
|
struct tty_struct *tty = tport->tty;
|
||||||
struct sci_port *s = to_sci_port(port);
|
struct sci_port *s = to_sci_port(port);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -732,7 +733,7 @@ static int sci_handle_errors(struct uart_port *port)
|
||||||
port->icount.overrun++;
|
port->icount.overrun++;
|
||||||
|
|
||||||
/* overrun error */
|
/* overrun error */
|
||||||
if (tty_insert_flip_char(tty, 0, TTY_OVERRUN))
|
if (tty_insert_flip_char(tport, 0, TTY_OVERRUN))
|
||||||
copied++;
|
copied++;
|
||||||
|
|
||||||
dev_notice(port->dev, "overrun error");
|
dev_notice(port->dev, "overrun error");
|
||||||
|
@ -756,7 +757,7 @@ static int sci_handle_errors(struct uart_port *port)
|
||||||
|
|
||||||
dev_dbg(port->dev, "BREAK detected\n");
|
dev_dbg(port->dev, "BREAK detected\n");
|
||||||
|
|
||||||
if (tty_insert_flip_char(tty, 0, TTY_BREAK))
|
if (tty_insert_flip_char(tport, 0, TTY_BREAK))
|
||||||
copied++;
|
copied++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -764,7 +765,7 @@ static int sci_handle_errors(struct uart_port *port)
|
||||||
/* frame error */
|
/* frame error */
|
||||||
port->icount.frame++;
|
port->icount.frame++;
|
||||||
|
|
||||||
if (tty_insert_flip_char(tty, 0, TTY_FRAME))
|
if (tty_insert_flip_char(tport, 0, TTY_FRAME))
|
||||||
copied++;
|
copied++;
|
||||||
|
|
||||||
dev_notice(port->dev, "frame error\n");
|
dev_notice(port->dev, "frame error\n");
|
||||||
|
@ -775,7 +776,7 @@ static int sci_handle_errors(struct uart_port *port)
|
||||||
/* parity error */
|
/* parity error */
|
||||||
port->icount.parity++;
|
port->icount.parity++;
|
||||||
|
|
||||||
if (tty_insert_flip_char(tty, 0, TTY_PARITY))
|
if (tty_insert_flip_char(tport, 0, TTY_PARITY))
|
||||||
copied++;
|
copied++;
|
||||||
|
|
||||||
dev_notice(port->dev, "parity error");
|
dev_notice(port->dev, "parity error");
|
||||||
|
@ -789,7 +790,8 @@ static int sci_handle_errors(struct uart_port *port)
|
||||||
|
|
||||||
static int sci_handle_fifo_overrun(struct uart_port *port)
|
static int sci_handle_fifo_overrun(struct uart_port *port)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = port->state->port.tty;
|
struct tty_port *tport = &port->state->port;
|
||||||
|
struct tty_struct *tty = tport->tty;
|
||||||
struct sci_port *s = to_sci_port(port);
|
struct sci_port *s = to_sci_port(port);
|
||||||
struct plat_sci_reg *reg;
|
struct plat_sci_reg *reg;
|
||||||
int copied = 0;
|
int copied = 0;
|
||||||
|
@ -803,7 +805,7 @@ static int sci_handle_fifo_overrun(struct uart_port *port)
|
||||||
|
|
||||||
port->icount.overrun++;
|
port->icount.overrun++;
|
||||||
|
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(tport, 0, TTY_OVERRUN);
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
|
||||||
dev_notice(port->dev, "overrun error\n");
|
dev_notice(port->dev, "overrun error\n");
|
||||||
|
@ -817,7 +819,8 @@ static int sci_handle_breaks(struct uart_port *port)
|
||||||
{
|
{
|
||||||
int copied = 0;
|
int copied = 0;
|
||||||
unsigned short status = serial_port_in(port, SCxSR);
|
unsigned short status = serial_port_in(port, SCxSR);
|
||||||
struct tty_struct *tty = port->state->port.tty;
|
struct tty_port *tport = &port->state->port;
|
||||||
|
struct tty_struct *tty = tport->tty;
|
||||||
struct sci_port *s = to_sci_port(port);
|
struct sci_port *s = to_sci_port(port);
|
||||||
|
|
||||||
if (uart_handle_break(port))
|
if (uart_handle_break(port))
|
||||||
|
@ -832,7 +835,7 @@ static int sci_handle_breaks(struct uart_port *port)
|
||||||
port->icount.brk++;
|
port->icount.brk++;
|
||||||
|
|
||||||
/* Notify of BREAK */
|
/* Notify of BREAK */
|
||||||
if (tty_insert_flip_char(tty, 0, TTY_BREAK))
|
if (tty_insert_flip_char(tport, 0, TTY_BREAK))
|
||||||
copied++;
|
copied++;
|
||||||
|
|
||||||
dev_dbg(port->dev, "BREAK detected\n");
|
dev_dbg(port->dev, "BREAK detected\n");
|
||||||
|
@ -1260,8 +1263,7 @@ static void sci_dma_tx_complete(void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Locking: called with port lock held */
|
/* Locking: called with port lock held */
|
||||||
static int sci_dma_rx_push(struct sci_port *s, struct tty_struct *tty,
|
static int sci_dma_rx_push(struct sci_port *s, size_t count)
|
||||||
size_t count)
|
|
||||||
{
|
{
|
||||||
struct uart_port *port = &s->port;
|
struct uart_port *port = &s->port;
|
||||||
struct tty_port *tport = &port->state->port;
|
struct tty_port *tport = &port->state->port;
|
||||||
|
@ -1285,7 +1287,7 @@ static int sci_dma_rx_push(struct sci_port *s, struct tty_struct *tty,
|
||||||
return room;
|
return room;
|
||||||
|
|
||||||
for (i = 0; i < room; i++)
|
for (i = 0; i < room; i++)
|
||||||
tty_insert_flip_char(tty, ((u8 *)sg_virt(&s->sg_rx[active]))[i],
|
tty_insert_flip_char(tport, ((u8 *)sg_virt(&s->sg_rx[active]))[i],
|
||||||
TTY_NORMAL);
|
TTY_NORMAL);
|
||||||
|
|
||||||
port->icount.rx += room;
|
port->icount.rx += room;
|
||||||
|
@ -1305,7 +1307,7 @@ static void sci_dma_rx_complete(void *arg)
|
||||||
|
|
||||||
spin_lock_irqsave(&port->lock, flags);
|
spin_lock_irqsave(&port->lock, flags);
|
||||||
|
|
||||||
count = sci_dma_rx_push(s, tty, s->buf_len_rx);
|
count = sci_dma_rx_push(s, s->buf_len_rx);
|
||||||
|
|
||||||
mod_timer(&s->rx_timer, jiffies + s->rx_timeout);
|
mod_timer(&s->rx_timer, jiffies + s->rx_timeout);
|
||||||
|
|
||||||
|
@ -1418,7 +1420,7 @@ static void work_fn_rx(struct work_struct *work)
|
||||||
sh_desc->partial, sh_desc->cookie);
|
sh_desc->partial, sh_desc->cookie);
|
||||||
|
|
||||||
spin_lock_irqsave(&port->lock, flags);
|
spin_lock_irqsave(&port->lock, flags);
|
||||||
count = sci_dma_rx_push(s, tty, sh_desc->partial);
|
count = sci_dma_rx_push(s, sh_desc->partial);
|
||||||
spin_unlock_irqrestore(&port->lock, flags);
|
spin_unlock_irqrestore(&port->lock, flags);
|
||||||
|
|
||||||
if (count)
|
if (count)
|
||||||
|
|
|
@ -457,6 +457,7 @@ static int sn_debug_printf(const char *fmt, ...)
|
||||||
static void
|
static void
|
||||||
sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
|
sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
|
||||||
{
|
{
|
||||||
|
struct tty_port *tport = NULL;
|
||||||
int ch;
|
int ch;
|
||||||
struct tty_struct *tty;
|
struct tty_struct *tty;
|
||||||
|
|
||||||
|
@ -472,7 +473,8 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
|
||||||
|
|
||||||
if (port->sc_port.state) {
|
if (port->sc_port.state) {
|
||||||
/* The serial_core stuffs are initialized, use them */
|
/* The serial_core stuffs are initialized, use them */
|
||||||
tty = port->sc_port.state->port.tty;
|
tport = &port->sc_port.state->port;
|
||||||
|
tty = tport->tty;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Not registered yet - can't pass to tty layer. */
|
/* Not registered yet - can't pass to tty layer. */
|
||||||
|
@ -517,7 +519,7 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
|
||||||
|
|
||||||
/* record the character to pass up to the tty layer */
|
/* record the character to pass up to the tty layer */
|
||||||
if (tty) {
|
if (tty) {
|
||||||
if(tty_insert_flip_char(tty, ch, TTY_NORMAL) == 0)
|
if (tty_insert_flip_char(tport, ch, TTY_NORMAL) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
port->sc_port.icount.rx++;
|
port->sc_port.icount.rx++;
|
||||||
|
|
|
@ -99,7 +99,7 @@ static int receive_chars_getchar(struct uart_port *port, struct tty_struct *tty)
|
||||||
uart_handle_dcd_change(port, 1);
|
uart_handle_dcd_change(port, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tty == NULL) {
|
if (port->state == NULL) {
|
||||||
uart_handle_sysrq_char(port, c);
|
uart_handle_sysrq_char(port, c);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ static int receive_chars_getchar(struct uart_port *port, struct tty_struct *tty)
|
||||||
if (uart_handle_sysrq_char(port, c))
|
if (uart_handle_sysrq_char(port, c))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
tty_insert_flip_char(tty, c, TTY_NORMAL);
|
tty_insert_flip_char(&port->state->port, c, TTY_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return saw_console_brk;
|
return saw_console_brk;
|
||||||
|
|
|
@ -111,6 +111,7 @@ static struct tty_struct *
|
||||||
receive_chars(struct uart_sunsab_port *up,
|
receive_chars(struct uart_sunsab_port *up,
|
||||||
union sab82532_irq_status *stat)
|
union sab82532_irq_status *stat)
|
||||||
{
|
{
|
||||||
|
struct tty_port *port = NULL;
|
||||||
struct tty_struct *tty = NULL;
|
struct tty_struct *tty = NULL;
|
||||||
unsigned char buf[32];
|
unsigned char buf[32];
|
||||||
int saw_console_brk = 0;
|
int saw_console_brk = 0;
|
||||||
|
@ -118,8 +119,10 @@ receive_chars(struct uart_sunsab_port *up,
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (up->port.state != NULL) /* Unopened serial console */
|
if (up->port.state != NULL) { /* Unopened serial console */
|
||||||
tty = up->port.state->port.tty;
|
port = &up->port.state->port;
|
||||||
|
tty = port->tty;
|
||||||
|
}
|
||||||
|
|
||||||
/* Read number of BYTES (Character + Status) available. */
|
/* Read number of BYTES (Character + Status) available. */
|
||||||
if (stat->sreg.isr0 & SAB82532_ISR0_RPF) {
|
if (stat->sreg.isr0 & SAB82532_ISR0_RPF) {
|
||||||
|
@ -160,11 +163,6 @@ receive_chars(struct uart_sunsab_port *up,
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
unsigned char ch = buf[i], flag;
|
unsigned char ch = buf[i], flag;
|
||||||
|
|
||||||
if (tty == NULL) {
|
|
||||||
uart_handle_sysrq_char(&up->port, ch);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
flag = TTY_NORMAL;
|
flag = TTY_NORMAL;
|
||||||
up->port.icount.rx++;
|
up->port.icount.rx++;
|
||||||
|
|
||||||
|
@ -213,9 +211,9 @@ receive_chars(struct uart_sunsab_port *up,
|
||||||
|
|
||||||
if ((stat->sreg.isr0 & (up->port.ignore_status_mask & 0xff)) == 0 &&
|
if ((stat->sreg.isr0 & (up->port.ignore_status_mask & 0xff)) == 0 &&
|
||||||
(stat->sreg.isr1 & ((up->port.ignore_status_mask >> 8) & 0xff)) == 0)
|
(stat->sreg.isr1 & ((up->port.ignore_status_mask >> 8) & 0xff)) == 0)
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(port, ch, flag);
|
||||||
if (stat->sreg.isr0 & SAB82532_ISR0_RFO)
|
if (stat->sreg.isr0 & SAB82532_ISR0_RFO)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (saw_console_brk)
|
if (saw_console_brk)
|
||||||
|
|
|
@ -318,7 +318,8 @@ static void sunsu_enable_ms(struct uart_port *port)
|
||||||
static struct tty_struct *
|
static struct tty_struct *
|
||||||
receive_chars(struct uart_sunsu_port *up, unsigned char *status)
|
receive_chars(struct uart_sunsu_port *up, unsigned char *status)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = up->port.state->port.tty;
|
struct tty_port *port = &up->port.state->port;
|
||||||
|
struct tty_struct *tty = port->tty;
|
||||||
unsigned char ch, flag;
|
unsigned char ch, flag;
|
||||||
int max_count = 256;
|
int max_count = 256;
|
||||||
int saw_console_brk = 0;
|
int saw_console_brk = 0;
|
||||||
|
@ -376,14 +377,14 @@ receive_chars(struct uart_sunsu_port *up, unsigned char *status)
|
||||||
if (uart_handle_sysrq_char(&up->port, ch))
|
if (uart_handle_sysrq_char(&up->port, ch))
|
||||||
goto ignore_char;
|
goto ignore_char;
|
||||||
if ((*status & up->port.ignore_status_mask) == 0)
|
if ((*status & up->port.ignore_status_mask) == 0)
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(port, ch, flag);
|
||||||
if (*status & UART_LSR_OE)
|
if (*status & UART_LSR_OE)
|
||||||
/*
|
/*
|
||||||
* Overrun is special, since it's reported
|
* Overrun is special, since it's reported
|
||||||
* immediately, and doesn't affect the current
|
* immediately, and doesn't affect the current
|
||||||
* character.
|
* character.
|
||||||
*/
|
*/
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||||
ignore_char:
|
ignore_char:
|
||||||
*status = serial_inp(up, UART_LSR);
|
*status = serial_inp(up, UART_LSR);
|
||||||
} while ((*status & UART_LSR_DR) && (max_count-- > 0));
|
} while ((*status & UART_LSR_DR) && (max_count-- > 0));
|
||||||
|
|
|
@ -327,13 +327,15 @@ static struct tty_struct *
|
||||||
sunzilog_receive_chars(struct uart_sunzilog_port *up,
|
sunzilog_receive_chars(struct uart_sunzilog_port *up,
|
||||||
struct zilog_channel __iomem *channel)
|
struct zilog_channel __iomem *channel)
|
||||||
{
|
{
|
||||||
|
struct tty_port *port = NULL;
|
||||||
struct tty_struct *tty;
|
struct tty_struct *tty;
|
||||||
unsigned char ch, r1, flag;
|
unsigned char ch, r1, flag;
|
||||||
|
|
||||||
tty = NULL;
|
tty = NULL;
|
||||||
if (up->port.state != NULL && /* Unopened serial console */
|
if (up->port.state != NULL) { /* Unopened serial console */
|
||||||
up->port.state->port.tty != NULL) /* Keyboard || mouse */
|
port = &up->port.state->port;
|
||||||
tty = up->port.state->port.tty;
|
tty = port->tty; /* mouse => tty is NULL */
|
||||||
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
||||||
|
@ -366,11 +368,6 @@ sunzilog_receive_chars(struct uart_sunzilog_port *up,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tty == NULL) {
|
|
||||||
uart_handle_sysrq_char(&up->port, ch);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* A real serial line, record the character and status. */
|
/* A real serial line, record the character and status. */
|
||||||
flag = TTY_NORMAL;
|
flag = TTY_NORMAL;
|
||||||
up->port.icount.rx++;
|
up->port.icount.rx++;
|
||||||
|
@ -400,10 +397,10 @@ sunzilog_receive_chars(struct uart_sunzilog_port *up,
|
||||||
|
|
||||||
if (up->port.ignore_status_mask == 0xff ||
|
if (up->port.ignore_status_mask == 0xff ||
|
||||||
(r1 & up->port.ignore_status_mask) == 0) {
|
(r1 & up->port.ignore_status_mask) == 0) {
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(port, ch, flag);
|
||||||
}
|
}
|
||||||
if (r1 & Rx_OVR)
|
if (r1 & Rx_OVR)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tty;
|
return tty;
|
||||||
|
|
|
@ -91,12 +91,12 @@ static void timbuart_flush_buffer(struct uart_port *port)
|
||||||
|
|
||||||
static void timbuart_rx_chars(struct uart_port *port)
|
static void timbuart_rx_chars(struct uart_port *port)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = port->state->port.tty;
|
struct tty_port *tport = &port->state->port;
|
||||||
|
|
||||||
while (ioread32(port->membase + TIMBUART_ISR) & RXDP) {
|
while (ioread32(port->membase + TIMBUART_ISR) & RXDP) {
|
||||||
u8 ch = ioread8(port->membase + TIMBUART_RXFIFO);
|
u8 ch = ioread8(port->membase + TIMBUART_RXFIFO);
|
||||||
port->icount.rx++;
|
port->icount.rx++;
|
||||||
tty_insert_flip_char(tty, ch, TTY_NORMAL);
|
tty_insert_flip_char(tport, ch, TTY_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock(&port->lock);
|
spin_unlock(&port->lock);
|
||||||
|
|
|
@ -66,7 +66,7 @@ static struct uart_port ulite_ports[ULITE_NR_UARTS];
|
||||||
|
|
||||||
static int ulite_receive(struct uart_port *port, int stat)
|
static int ulite_receive(struct uart_port *port, int stat)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = port->state->port.tty;
|
struct tty_port *tport = &port->state->port;
|
||||||
unsigned char ch = 0;
|
unsigned char ch = 0;
|
||||||
char flag = TTY_NORMAL;
|
char flag = TTY_NORMAL;
|
||||||
|
|
||||||
|
@ -103,13 +103,13 @@ static int ulite_receive(struct uart_port *port, int stat)
|
||||||
stat &= ~port->ignore_status_mask;
|
stat &= ~port->ignore_status_mask;
|
||||||
|
|
||||||
if (stat & ULITE_STATUS_RXVALID)
|
if (stat & ULITE_STATUS_RXVALID)
|
||||||
tty_insert_flip_char(tty, ch, flag);
|
tty_insert_flip_char(tport, ch, flag);
|
||||||
|
|
||||||
if (stat & ULITE_STATUS_FRAME)
|
if (stat & ULITE_STATUS_FRAME)
|
||||||
tty_insert_flip_char(tty, 0, TTY_FRAME);
|
tty_insert_flip_char(tport, 0, TTY_FRAME);
|
||||||
|
|
||||||
if (stat & ULITE_STATUS_OVERRUN)
|
if (stat & ULITE_STATUS_OVERRUN)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(tport, 0, TTY_OVERRUN);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -513,7 +513,7 @@ static void qe_uart_int_rx(struct uart_qe_port *qe_port)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
error_return:
|
error_return:
|
||||||
tty_insert_flip_char(tty, ch, flg);
|
tty_insert_flip_char(tport, ch, flg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -561,7 +561,7 @@ handle_error:
|
||||||
|
|
||||||
/* Overrun does not affect the current character ! */
|
/* Overrun does not affect the current character ! */
|
||||||
if (status & BD_SC_OV)
|
if (status & BD_SC_OV)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(tport, 0, TTY_OVERRUN);
|
||||||
#ifdef SUPPORT_SYSRQ
|
#ifdef SUPPORT_SYSRQ
|
||||||
port->sysrq = 0;
|
port->sysrq = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -136,7 +136,8 @@ static void vt8500_enable_ms(struct uart_port *port)
|
||||||
|
|
||||||
static void handle_rx(struct uart_port *port)
|
static void handle_rx(struct uart_port *port)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = tty_port_tty_get(&port->state->port);
|
struct tty_port *tport = &port->state->port;
|
||||||
|
struct tty_struct *tty = tty_port_tty_get(tport);
|
||||||
if (!tty) {
|
if (!tty) {
|
||||||
/* Discard data: no tty available */
|
/* Discard data: no tty available */
|
||||||
int count = (vt8500_read(port, VT8500_URFIDX) & 0x1f00) >> 8;
|
int count = (vt8500_read(port, VT8500_URFIDX) & 0x1f00) >> 8;
|
||||||
|
@ -151,7 +152,7 @@ static void handle_rx(struct uart_port *port)
|
||||||
*/
|
*/
|
||||||
if ((vt8500_read(port, VT8500_URISR) & RXOVER)) {
|
if ((vt8500_read(port, VT8500_URISR) & RXOVER)) {
|
||||||
port->icount.overrun++;
|
port->icount.overrun++;
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(tport, 0, TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* and now the main RX loop */
|
/* and now the main RX loop */
|
||||||
|
@ -174,7 +175,7 @@ static void handle_rx(struct uart_port *port)
|
||||||
port->icount.rx++;
|
port->icount.rx++;
|
||||||
|
|
||||||
if (!uart_handle_sysrq_char(port, c))
|
if (!uart_handle_sysrq_char(port, c))
|
||||||
tty_insert_flip_char(tty, c, flag);
|
tty_insert_flip_char(tport, c, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
|
|
@ -1507,13 +1507,13 @@ static void mgsl_isr_receive_data( struct mgsl_struct *info )
|
||||||
else if (status & RXSTATUS_FRAMING_ERROR)
|
else if (status & RXSTATUS_FRAMING_ERROR)
|
||||||
flag = TTY_FRAME;
|
flag = TTY_FRAME;
|
||||||
} /* end of if (error) */
|
} /* end of if (error) */
|
||||||
tty_insert_flip_char(tty, DataByte, flag);
|
tty_insert_flip_char(&info->port, DataByte, flag);
|
||||||
if (status & RXSTATUS_OVERRUN) {
|
if (status & RXSTATUS_OVERRUN) {
|
||||||
/* Overrun is special, since it's
|
/* Overrun is special, since it's
|
||||||
* reported immediately, and doesn't
|
* reported immediately, and doesn't
|
||||||
* affect the current character
|
* affect the current character
|
||||||
*/
|
*/
|
||||||
work += tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
work += tty_insert_flip_char(&info->port, 0, TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1893,10 +1893,8 @@ static void rx_async(struct slgt_info *info)
|
||||||
else if (status & BIT0)
|
else if (status & BIT0)
|
||||||
stat = TTY_FRAME;
|
stat = TTY_FRAME;
|
||||||
}
|
}
|
||||||
if (tty) {
|
tty_insert_flip_char(&info->port, ch, stat);
|
||||||
tty_insert_flip_char(tty, ch, stat);
|
chars++;
|
||||||
chars++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i < count) {
|
if (i < count) {
|
||||||
|
@ -2182,7 +2180,7 @@ static void isr_serial(struct slgt_info *info)
|
||||||
if (info->port.tty) {
|
if (info->port.tty) {
|
||||||
if (!(status & info->ignore_status_mask)) {
|
if (!(status & info->ignore_status_mask)) {
|
||||||
if (info->read_status_mask & MASK_BREAK) {
|
if (info->read_status_mask & MASK_BREAK) {
|
||||||
tty_insert_flip_char(info->port.tty, 0, TTY_BREAK);
|
tty_insert_flip_char(&info->port, 0, TTY_BREAK);
|
||||||
if (info->port.flags & ASYNC_SAK)
|
if (info->port.flags & ASYNC_SAK)
|
||||||
do_SAK(info->port.tty);
|
do_SAK(info->port.tty);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2131,13 +2131,11 @@ static void isr_rxint(SLMP_INFO * info)
|
||||||
/* process break detection if tty control
|
/* process break detection if tty control
|
||||||
* is not set to ignore it
|
* is not set to ignore it
|
||||||
*/
|
*/
|
||||||
if ( tty ) {
|
if (!(status & info->ignore_status_mask1)) {
|
||||||
if (!(status & info->ignore_status_mask1)) {
|
if (info->read_status_mask1 & BRKD) {
|
||||||
if (info->read_status_mask1 & BRKD) {
|
tty_insert_flip_char(&info->port, 0, TTY_BREAK);
|
||||||
tty_insert_flip_char(tty, 0, TTY_BREAK);
|
if (tty && (info->port.flags & ASYNC_SAK))
|
||||||
if (info->port.flags & ASYNC_SAK)
|
do_SAK(tty);
|
||||||
do_SAK(tty);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2202,26 +2200,22 @@ static void isr_rxrdy(SLMP_INFO * info)
|
||||||
|
|
||||||
status &= info->read_status_mask2;
|
status &= info->read_status_mask2;
|
||||||
|
|
||||||
if ( tty ) {
|
if (status & PE)
|
||||||
if (status & PE)
|
flag = TTY_PARITY;
|
||||||
flag = TTY_PARITY;
|
else if (status & FRME)
|
||||||
else if (status & FRME)
|
flag = TTY_FRAME;
|
||||||
flag = TTY_FRAME;
|
if (status & OVRN) {
|
||||||
if (status & OVRN) {
|
/* Overrun is special, since it's
|
||||||
/* Overrun is special, since it's
|
* reported immediately, and doesn't
|
||||||
* reported immediately, and doesn't
|
* affect the current character
|
||||||
* affect the current character
|
*/
|
||||||
*/
|
over = true;
|
||||||
over = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} /* end of if (error) */
|
} /* end of if (error) */
|
||||||
|
|
||||||
if ( tty ) {
|
tty_insert_flip_char(&info->port, DataByte, flag);
|
||||||
tty_insert_flip_char(tty, DataByte, flag);
|
if (over)
|
||||||
if (over)
|
tty_insert_flip_char(&info->port, 0, TTY_OVERRUN);
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( debug_level >= DEBUG_LEVEL_ISR ) {
|
if ( debug_level >= DEBUG_LEVEL_ISR ) {
|
||||||
|
|
|
@ -309,8 +309,8 @@ static void put_queue(struct vc_data *vc, int ch)
|
||||||
{
|
{
|
||||||
struct tty_struct *tty = vc->port.tty;
|
struct tty_struct *tty = vc->port.tty;
|
||||||
|
|
||||||
|
tty_insert_flip_char(&vc->port, ch, 0);
|
||||||
if (tty) {
|
if (tty) {
|
||||||
tty_insert_flip_char(tty, ch, 0);
|
|
||||||
tty_schedule_flip(tty);
|
tty_schedule_flip(tty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -323,7 +323,7 @@ static void puts_queue(struct vc_data *vc, char *cp)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while (*cp) {
|
while (*cp) {
|
||||||
tty_insert_flip_char(tty, *cp, 0);
|
tty_insert_flip_char(&vc->port, *cp, 0);
|
||||||
cp++;
|
cp++;
|
||||||
}
|
}
|
||||||
tty_schedule_flip(tty);
|
tty_schedule_flip(tty);
|
||||||
|
@ -586,7 +586,7 @@ static void fn_send_intr(struct vc_data *vc)
|
||||||
|
|
||||||
if (!tty)
|
if (!tty)
|
||||||
return;
|
return;
|
||||||
tty_insert_flip_char(tty, 0, TTY_BREAK);
|
tty_insert_flip_char(&vc->port, 0, TTY_BREAK);
|
||||||
tty_schedule_flip(tty);
|
tty_schedule_flip(tty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1336,7 +1336,7 @@ static void csi_m(struct vc_data *vc)
|
||||||
static void respond_string(const char *p, struct tty_struct *tty)
|
static void respond_string(const char *p, struct tty_struct *tty)
|
||||||
{
|
{
|
||||||
while (*p) {
|
while (*p) {
|
||||||
tty_insert_flip_char(tty, *p, 0);
|
tty_insert_flip_char(tty->port, *p, 0);
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
tty_schedule_flip(tty);
|
tty_schedule_flip(tty);
|
||||||
|
|
|
@ -703,7 +703,7 @@ static void ark3116_process_read_urb(struct urb *urb)
|
||||||
|
|
||||||
/* overrun is special, not associated with a char */
|
/* overrun is special, not associated with a char */
|
||||||
if (lsr & UART_LSR_OE)
|
if (lsr & UART_LSR_OE)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(&port->port, 0, TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag,
|
tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag,
|
||||||
urb->actual_length);
|
urb->actual_length);
|
||||||
|
|
|
@ -276,7 +276,7 @@ static void belkin_sa_process_read_urb(struct urb *urb)
|
||||||
|
|
||||||
/* Overrun is special, not associated with a char. */
|
/* Overrun is special, not associated with a char. */
|
||||||
if (status & BELKIN_SA_LSR_OE)
|
if (status & BELKIN_SA_LSR_OE)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(&port->port, 0, TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
|
|
||||||
tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag,
|
tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag,
|
||||||
|
|
|
@ -1441,7 +1441,7 @@ static int digi_read_inb_callback(struct urb *urb)
|
||||||
|
|
||||||
/* overrun is special, not associated with a char */
|
/* overrun is special, not associated with a char */
|
||||||
if (port_status & DIGI_OVERRUN_ERROR)
|
if (port_status & DIGI_OVERRUN_ERROR)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(&port->port, 0, TTY_OVERRUN);
|
||||||
|
|
||||||
/* break takes precedence over parity, */
|
/* break takes precedence over parity, */
|
||||||
/* which takes precedence over framing errors */
|
/* which takes precedence over framing errors */
|
||||||
|
|
|
@ -133,12 +133,13 @@ static void f81232_process_read_urb(struct urb *urb)
|
||||||
|
|
||||||
/* overrun is special, not associated with a char */
|
/* overrun is special, not associated with a char */
|
||||||
if (line_status & UART_OVERRUN_ERROR)
|
if (line_status & UART_OVERRUN_ERROR)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(&port->port, 0, TTY_OVERRUN);
|
||||||
|
|
||||||
if (port->port.console && port->sysrq) {
|
if (port->port.console && port->sysrq) {
|
||||||
for (i = 0; i < urb->actual_length; ++i)
|
for (i = 0; i < urb->actual_length; ++i)
|
||||||
if (!usb_serial_handle_sysrq_char(port, data[i]))
|
if (!usb_serial_handle_sysrq_char(port, data[i]))
|
||||||
tty_insert_flip_char(tty, data[i], tty_flag);
|
tty_insert_flip_char(&port->port, data[i],
|
||||||
|
tty_flag);
|
||||||
} else {
|
} else {
|
||||||
tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag,
|
tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag,
|
||||||
urb->actual_length);
|
urb->actual_length);
|
||||||
|
|
|
@ -1958,9 +1958,8 @@ static int ftdi_prepare_write_buffer(struct usb_serial_port *port,
|
||||||
|
|
||||||
#define FTDI_RS_ERR_MASK (FTDI_RS_BI | FTDI_RS_PE | FTDI_RS_FE | FTDI_RS_OE)
|
#define FTDI_RS_ERR_MASK (FTDI_RS_BI | FTDI_RS_PE | FTDI_RS_FE | FTDI_RS_OE)
|
||||||
|
|
||||||
static int ftdi_process_packet(struct tty_struct *tty,
|
static int ftdi_process_packet(struct usb_serial_port *port,
|
||||||
struct usb_serial_port *port, struct ftdi_private *priv,
|
struct ftdi_private *priv, char *packet, int len)
|
||||||
char *packet, int len)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char status;
|
char status;
|
||||||
|
@ -2010,7 +2009,7 @@ static int ftdi_process_packet(struct tty_struct *tty,
|
||||||
/* Overrun is special, not associated with a char */
|
/* Overrun is special, not associated with a char */
|
||||||
if (packet[1] & FTDI_RS_OE) {
|
if (packet[1] & FTDI_RS_OE) {
|
||||||
priv->icount.overrun++;
|
priv->icount.overrun++;
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(&port->port, 0, TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2029,7 +2028,7 @@ static int ftdi_process_packet(struct tty_struct *tty,
|
||||||
if (port->port.console && port->sysrq) {
|
if (port->port.console && port->sysrq) {
|
||||||
for (i = 0; i < len; i++, ch++) {
|
for (i = 0; i < len; i++, ch++) {
|
||||||
if (!usb_serial_handle_sysrq_char(port, *ch))
|
if (!usb_serial_handle_sysrq_char(port, *ch))
|
||||||
tty_insert_flip_char(tty, *ch, flag);
|
tty_insert_flip_char(&port->port, *ch, flag);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tty_insert_flip_string_fixed_flag(&port->port, ch, flag, len);
|
tty_insert_flip_string_fixed_flag(&port->port, ch, flag, len);
|
||||||
|
@ -2054,7 +2053,7 @@ static void ftdi_process_read_urb(struct urb *urb)
|
||||||
|
|
||||||
for (i = 0; i < urb->actual_length; i += priv->max_packet_size) {
|
for (i = 0; i < urb->actual_length; i += priv->max_packet_size) {
|
||||||
len = min_t(int, urb->actual_length - i, priv->max_packet_size);
|
len = min_t(int, urb->actual_length - i, priv->max_packet_size);
|
||||||
count += ftdi_process_packet(tty, port, priv, &data[i], len);
|
count += ftdi_process_packet(port, priv, &data[i], len);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count)
|
if (count)
|
||||||
|
|
|
@ -332,7 +332,7 @@ void usb_serial_generic_process_read_urb(struct urb *urb)
|
||||||
else {
|
else {
|
||||||
for (i = 0; i < urb->actual_length; i++, ch++) {
|
for (i = 0; i < urb->actual_length; i++, ch++) {
|
||||||
if (!usb_serial_handle_sysrq_char(port, *ch))
|
if (!usb_serial_handle_sysrq_char(port, *ch))
|
||||||
tty_insert_flip_char(tty, *ch, TTY_NORMAL);
|
tty_insert_flip_char(&port->port, *ch, TTY_NORMAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
|
|
@ -315,7 +315,7 @@ static void usa26_indat_callback(struct urb *urb)
|
||||||
else
|
else
|
||||||
err = 0;
|
err = 0;
|
||||||
for (i = 1; i < urb->actual_length ; ++i)
|
for (i = 1; i < urb->actual_length ; ++i)
|
||||||
tty_insert_flip_char(tty, data[i], err);
|
tty_insert_flip_char(&port->port, data[i], err);
|
||||||
} else {
|
} else {
|
||||||
/* some bytes had errors, every byte has status */
|
/* some bytes had errors, every byte has status */
|
||||||
dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
|
dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
|
||||||
|
@ -328,7 +328,8 @@ static void usa26_indat_callback(struct urb *urb)
|
||||||
if (stat & RXERROR_PARITY)
|
if (stat & RXERROR_PARITY)
|
||||||
flag |= TTY_PARITY;
|
flag |= TTY_PARITY;
|
||||||
/* XXX should handle break (0x10) */
|
/* XXX should handle break (0x10) */
|
||||||
tty_insert_flip_char(tty, data[i+1], flag);
|
tty_insert_flip_char(&port->port, data[i+1],
|
||||||
|
flag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
@ -700,7 +701,8 @@ static void usa49_indat_callback(struct urb *urb)
|
||||||
if (stat & RXERROR_PARITY)
|
if (stat & RXERROR_PARITY)
|
||||||
flag |= TTY_PARITY;
|
flag |= TTY_PARITY;
|
||||||
/* XXX should handle break (0x10) */
|
/* XXX should handle break (0x10) */
|
||||||
tty_insert_flip_char(tty, data[i+1], flag);
|
tty_insert_flip_char(&port->port, data[i+1],
|
||||||
|
flag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
@ -751,7 +753,8 @@ static void usa49wg_indat_callback(struct urb *urb)
|
||||||
/* no error on any byte */
|
/* no error on any byte */
|
||||||
i++;
|
i++;
|
||||||
for (x = 1; x < len ; ++x)
|
for (x = 1; x < len ; ++x)
|
||||||
tty_insert_flip_char(tty, data[i++], 0);
|
tty_insert_flip_char(&port->port,
|
||||||
|
data[i++], 0);
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* some bytes had errors, every byte has status
|
* some bytes had errors, every byte has status
|
||||||
|
@ -765,7 +768,7 @@ static void usa49wg_indat_callback(struct urb *urb)
|
||||||
if (stat & RXERROR_PARITY)
|
if (stat & RXERROR_PARITY)
|
||||||
flag |= TTY_PARITY;
|
flag |= TTY_PARITY;
|
||||||
/* XXX should handle break (0x10) */
|
/* XXX should handle break (0x10) */
|
||||||
tty_insert_flip_char(tty,
|
tty_insert_flip_char(&port->port,
|
||||||
data[i+1], flag);
|
data[i+1], flag);
|
||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
|
@ -824,8 +827,8 @@ static void usa90_indat_callback(struct urb *urb)
|
||||||
else
|
else
|
||||||
err = 0;
|
err = 0;
|
||||||
for (i = 1; i < urb->actual_length ; ++i)
|
for (i = 1; i < urb->actual_length ; ++i)
|
||||||
tty_insert_flip_char(tty, data[i],
|
tty_insert_flip_char(&port->port,
|
||||||
err);
|
data[i], err);
|
||||||
} else {
|
} else {
|
||||||
/* some bytes had errors, every byte has status */
|
/* some bytes had errors, every byte has status */
|
||||||
dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
|
dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
|
||||||
|
@ -838,8 +841,8 @@ static void usa90_indat_callback(struct urb *urb)
|
||||||
if (stat & RXERROR_PARITY)
|
if (stat & RXERROR_PARITY)
|
||||||
flag |= TTY_PARITY;
|
flag |= TTY_PARITY;
|
||||||
/* XXX should handle break (0x10) */
|
/* XXX should handle break (0x10) */
|
||||||
tty_insert_flip_char(tty, data[i+1],
|
tty_insert_flip_char(&port->port,
|
||||||
flag);
|
data[i+1], flag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -805,12 +805,13 @@ static void pl2303_process_read_urb(struct urb *urb)
|
||||||
|
|
||||||
/* overrun is special, not associated with a char */
|
/* overrun is special, not associated with a char */
|
||||||
if (line_status & UART_OVERRUN_ERROR)
|
if (line_status & UART_OVERRUN_ERROR)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(&port->port, 0, TTY_OVERRUN);
|
||||||
|
|
||||||
if (port->port.console && port->sysrq) {
|
if (port->port.console && port->sysrq) {
|
||||||
for (i = 0; i < urb->actual_length; ++i)
|
for (i = 0; i < urb->actual_length; ++i)
|
||||||
if (!usb_serial_handle_sysrq_char(port, data[i]))
|
if (!usb_serial_handle_sysrq_char(port, data[i]))
|
||||||
tty_insert_flip_char(tty, data[i], tty_flag);
|
tty_insert_flip_char(&port->port, data[i],
|
||||||
|
tty_flag);
|
||||||
} else {
|
} else {
|
||||||
tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag,
|
tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag,
|
||||||
urb->actual_length);
|
urb->actual_length);
|
||||||
|
|
|
@ -498,7 +498,7 @@ static void spcp8x5_process_read_urb(struct urb *urb)
|
||||||
|
|
||||||
/* overrun is special, not associated with a char */
|
/* overrun is special, not associated with a char */
|
||||||
if (status & UART_OVERRUN_ERROR)
|
if (status & UART_OVERRUN_ERROR)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(&port->port, 0, TTY_OVERRUN);
|
||||||
|
|
||||||
if (status & UART_DCD)
|
if (status & UART_DCD)
|
||||||
usb_serial_handle_dcd_change(port, tty,
|
usb_serial_handle_dcd_change(port, tty,
|
||||||
|
|
|
@ -582,8 +582,7 @@ static void ssu100_update_lsr(struct usb_serial_port *port, u8 lsr,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ssu100_process_packet(struct urb *urb,
|
static int ssu100_process_packet(struct urb *urb)
|
||||||
struct tty_struct *tty)
|
|
||||||
{
|
{
|
||||||
struct usb_serial_port *port = urb->context;
|
struct usb_serial_port *port = urb->context;
|
||||||
char *packet = (char *)urb->transfer_buffer;
|
char *packet = (char *)urb->transfer_buffer;
|
||||||
|
@ -598,7 +597,8 @@ static int ssu100_process_packet(struct urb *urb,
|
||||||
if (packet[2] == 0x00) {
|
if (packet[2] == 0x00) {
|
||||||
ssu100_update_lsr(port, packet[3], &flag);
|
ssu100_update_lsr(port, packet[3], &flag);
|
||||||
if (flag == TTY_OVERRUN)
|
if (flag == TTY_OVERRUN)
|
||||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
tty_insert_flip_char(&port->port, 0,
|
||||||
|
TTY_OVERRUN);
|
||||||
}
|
}
|
||||||
if (packet[2] == 0x01)
|
if (packet[2] == 0x01)
|
||||||
ssu100_update_msr(port, packet[3]);
|
ssu100_update_msr(port, packet[3]);
|
||||||
|
@ -614,7 +614,7 @@ static int ssu100_process_packet(struct urb *urb,
|
||||||
if (port->port.console && port->sysrq) {
|
if (port->port.console && port->sysrq) {
|
||||||
for (i = 0; i < len; i++, ch++) {
|
for (i = 0; i < len; i++, ch++) {
|
||||||
if (!usb_serial_handle_sysrq_char(port, *ch))
|
if (!usb_serial_handle_sysrq_char(port, *ch))
|
||||||
tty_insert_flip_char(tty, *ch, flag);
|
tty_insert_flip_char(&port->port, *ch, flag);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
tty_insert_flip_string_fixed_flag(&port->port, ch, flag, len);
|
tty_insert_flip_string_fixed_flag(&port->port, ch, flag, len);
|
||||||
|
@ -632,7 +632,7 @@ static void ssu100_process_read_urb(struct urb *urb)
|
||||||
if (!tty)
|
if (!tty)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
count = ssu100_process_packet(urb, tty);
|
count = ssu100_process_packet(urb);
|
||||||
|
|
||||||
if (count)
|
if (count)
|
||||||
tty_flip_buffer_push(tty);
|
tty_flip_buffer_push(tty);
|
||||||
|
|
|
@ -12,16 +12,16 @@ extern int tty_prepare_flip_string_flags(struct tty_port *port,
|
||||||
unsigned char **chars, char **flags, size_t size);
|
unsigned char **chars, char **flags, size_t size);
|
||||||
void tty_schedule_flip(struct tty_struct *tty);
|
void tty_schedule_flip(struct tty_struct *tty);
|
||||||
|
|
||||||
static inline int tty_insert_flip_char(struct tty_struct *tty,
|
static inline int tty_insert_flip_char(struct tty_port *port,
|
||||||
unsigned char ch, char flag)
|
unsigned char ch, char flag)
|
||||||
{
|
{
|
||||||
struct tty_buffer *tb = tty->port->buf.tail;
|
struct tty_buffer *tb = port->buf.tail;
|
||||||
if (tb && tb->used < tb->size) {
|
if (tb && tb->used < tb->size) {
|
||||||
tb->flag_buf_ptr[tb->used] = flag;
|
tb->flag_buf_ptr[tb->used] = flag;
|
||||||
tb->char_buf_ptr[tb->used++] = ch;
|
tb->char_buf_ptr[tb->used++] = ch;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return tty_insert_flip_string_flags(tty->port, &ch, &flag, 1);
|
return tty_insert_flip_string_flags(port, &ch, &flag, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, size_t size)
|
static inline int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, size_t size)
|
||||||
|
|
Loading…
Add table
Reference in a new issue