Skip to content

Commit ebbaf9a

Browse files
jk-ozlabsgregkh
authored andcommitted
serial/8250: export serial8250_read_char
Currently, we export serial8250_rx_chars, which does a whole bunch of reads from the 8250 data register, without any form of flow control between reads. An upcoming change to the aspeed vuart driver implements more fine-grained flow control in the interrupt handler, requiring character-at-a-time control over the rx path. This change exports serial8250_read_char to allow this. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Tested-by: Eddie James <eajames@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c5f78b1 commit ebbaf9a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

drivers/tty/serial/8250/8250_port.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,7 @@ static void serial8250_enable_ms(struct uart_port *port)
16801680
serial8250_rpm_put(up);
16811681
}
16821682

1683-
static void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr)
1683+
void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr)
16841684
{
16851685
struct uart_port *port = &up->port;
16861686
unsigned char ch;
@@ -1740,6 +1740,7 @@ static void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr)
17401740

17411741
uart_insert_char(port, lsr, UART_LSR_OE, ch, flag);
17421742
}
1743+
EXPORT_SYMBOL_GPL(serial8250_read_char);
17431744

17441745
/*
17451746
* serial8250_rx_chars: processes according to the passed in LSR

include/linux/serial_8250.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ extern void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl);
163163
extern int fsl8250_handle_irq(struct uart_port *port);
164164
int serial8250_handle_irq(struct uart_port *port, unsigned int iir);
165165
unsigned char serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr);
166+
void serial8250_read_char(struct uart_8250_port *up, unsigned char lsr);
166167
void serial8250_tx_chars(struct uart_8250_port *up);
167168
unsigned int serial8250_modem_status(struct uart_8250_port *up);
168169
void serial8250_init_port(struct uart_8250_port *up);

0 commit comments

Comments
 (0)