mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Revert "serial: Make uart_handle_cts_change() status param bool active"
This reverts commit04de065652which is commit968d64578eupstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: I47ee264f550533f670ef559661d69b923e2ca6c4 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -801,7 +801,7 @@ static irqreturn_t __imx_uart_rtsint(int irq, void *dev_id)
|
|||||||
|
|
||||||
imx_uart_writel(sport, USR1_RTSD, USR1);
|
imx_uart_writel(sport, USR1_RTSD, USR1);
|
||||||
usr1 = imx_uart_readl(sport, USR1) & USR1_RTSS;
|
usr1 = imx_uart_readl(sport, USR1) & USR1_RTSS;
|
||||||
uart_handle_cts_change(&sport->port, usr1);
|
uart_handle_cts_change(&sport->port, !!usr1);
|
||||||
wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
|
wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ static int max3100_handlerx_unlocked(struct max3100_port *s, u16 rx)
|
|||||||
cts = (rx & MAX3100_CTS) > 0;
|
cts = (rx & MAX3100_CTS) > 0;
|
||||||
if (s->cts != cts) {
|
if (s->cts != cts) {
|
||||||
s->cts = cts;
|
s->cts = cts;
|
||||||
uart_handle_cts_change(&s->port, cts);
|
uart_handle_cts_change(&s->port, cts ? TIOCM_CTS : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -843,7 +843,8 @@ static irqreturn_t max310x_port_irq(struct max310x_port *s, int portno)
|
|||||||
|
|
||||||
if (ists & MAX310X_IRQ_CTS_BIT) {
|
if (ists & MAX310X_IRQ_CTS_BIT) {
|
||||||
lsr = max310x_port_read(port, MAX310X_LSR_IRQSTS_REG);
|
lsr = max310x_port_read(port, MAX310X_LSR_IRQSTS_REG);
|
||||||
uart_handle_cts_change(port, lsr & MAX310X_LSR_CTS_BIT);
|
uart_handle_cts_change(port,
|
||||||
|
!!(lsr & MAX310X_LSR_CTS_BIT));
|
||||||
}
|
}
|
||||||
if (rxlen)
|
if (rxlen)
|
||||||
max310x_handle_rx(port, rxlen);
|
max310x_handle_rx(port, rxlen);
|
||||||
|
|||||||
@@ -3327,11 +3327,11 @@ EXPORT_SYMBOL_GPL(uart_handle_dcd_change);
|
|||||||
/**
|
/**
|
||||||
* uart_handle_cts_change - handle a change of clear-to-send state
|
* uart_handle_cts_change - handle a change of clear-to-send state
|
||||||
* @uport: uart_port structure for the open port
|
* @uport: uart_port structure for the open port
|
||||||
* @active: new clear-to-send status
|
* @status: new clear to send status, nonzero if active
|
||||||
*
|
*
|
||||||
* Caller must hold uport->lock.
|
* Caller must hold uport->lock.
|
||||||
*/
|
*/
|
||||||
void uart_handle_cts_change(struct uart_port *uport, bool active)
|
void uart_handle_cts_change(struct uart_port *uport, unsigned int status)
|
||||||
{
|
{
|
||||||
lockdep_assert_held_once(&uport->lock);
|
lockdep_assert_held_once(&uport->lock);
|
||||||
|
|
||||||
@@ -3339,13 +3339,13 @@ void uart_handle_cts_change(struct uart_port *uport, bool active)
|
|||||||
|
|
||||||
if (uart_softcts_mode(uport)) {
|
if (uart_softcts_mode(uport)) {
|
||||||
if (uport->hw_stopped) {
|
if (uport->hw_stopped) {
|
||||||
if (active) {
|
if (status) {
|
||||||
uport->hw_stopped = 0;
|
uport->hw_stopped = 0;
|
||||||
uport->ops->start_tx(uport);
|
uport->ops->start_tx(uport);
|
||||||
uart_write_wakeup(uport);
|
uart_write_wakeup(uport);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!active) {
|
if (!status) {
|
||||||
uport->hw_stopped = 1;
|
uport->hw_stopped = 1;
|
||||||
uport->ops->stop_tx(uport);
|
uport->ops->stop_tx(uport);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -900,7 +900,8 @@ static inline bool uart_softcts_mode(struct uart_port *uport)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
extern void uart_handle_dcd_change(struct uart_port *uport, bool active);
|
extern void uart_handle_dcd_change(struct uart_port *uport, bool active);
|
||||||
extern void uart_handle_cts_change(struct uart_port *uport, bool active);
|
extern void uart_handle_cts_change(struct uart_port *uport,
|
||||||
|
unsigned int status);
|
||||||
|
|
||||||
extern void uart_insert_char(struct uart_port *port, unsigned int status,
|
extern 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);
|
||||||
|
|||||||
Reference in New Issue
Block a user