summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroza pawandeep <oza@broadcom.com>2014-10-07 10:05:18 -0700
committeroza pawandeep <oza@broadcom.com>2014-10-07 10:05:18 -0700
commitf6c6b455036537816280f22b42c54fdd0b020cd8 (patch)
tree93625caed851537c0e1036e3f50de5a08aa01012
parent4f6b80566ac3c6285bbfa48083024b0e5ca0bd23 (diff)
downloadbcm-android-bcm-tetra-3.10-kitkat-wear.tar.gz
[UART] keep the afe enabled in interrupt handlerandroid-4.4w_r6android-bcm-tetra-3.10-kitkat-wear
do not disable autoflow control in BT recieve interrupt handler. though we re-enable it at watermark of 150 bytes, this should avoid and be at a safer side for fifo overrun corner cases. [bug: 17870872] Change-Id: I4b34f6dd3680d1a88f31fe0afa9effff838d8b15 Signed-off-by: oza pawandeep <oza@broadcom.com>
-rw-r--r--drivers/tty/serial/8250/8250_brcm_bt.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/tty/serial/8250/8250_brcm_bt.c b/drivers/tty/serial/8250/8250_brcm_bt.c
index a05018f87cd..2de2f3c249f 100644
--- a/drivers/tty/serial/8250/8250_brcm_bt.c
+++ b/drivers/tty/serial/8250/8250_brcm_bt.c
@@ -32,15 +32,6 @@ bt_serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr)
int n_fifo;
int mcr;
- /* Check whether Auto Flow control is enable in Modem control register
- * */
- mcr = port->serial_in(port, UART_MCR);
- if (mcr & UART_MCR_AFE) {
- afe_status = 1;
- /* Disabling Auto flow control */
- port->serial_out(port, UART_MCR, mcr & (~UART_MCR_AFE));
- }
-
/* Handle port gets called from either the interrupt context
* _OR_ from the timeout thread context (serial8250_timeout).
*
@@ -120,36 +111,11 @@ bt_serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr)
flag = TTY_FRAME;
}
- if (afe_status) {
- /* Re-enable AFE if FIFO level go up. (this is not
- * common)*/
- n_fifo = port->serial_in(port, UART_RX_FIFO_LEVEL);
- /* FIXME: Currently this is added as a workaround for
- * BT throughput. Received data available interrpt is
- * generated when FIFO is Half full.
- * Making sure we have enough time to clear the fifo by
- * initially disabling the auto flow control. When FIFO
- * has more than 150 bytes, enable the auto flow
- * control so that we dont run into overrun condition.
- * */
- if (n_fifo >= 150) {
- mcr = port->serial_in(port, UART_MCR);
- port->serial_out(port, UART_MCR, mcr | (UART_MCR_AFE));
- afe_status = 0;
- }
- }
-
uart_insert_char(&up->port, lsr, UART_LSR_OE, ch, flag);
ignore_char:
lsr = port->serial_in(port, UART_LSR);
} while ((lsr & (UART_LSR_DR | UART_LSR_BI)) && (max_count-- > 0));
- /* Keep the Auto flow control to its pervious state.*/
- if (afe_status) {
- /* MUST enable AFE when exit this routine */
- mcr = port->serial_in(port, UART_MCR);
- port->serial_out(port, UART_MCR, mcr | (UART_MCR_AFE));
- }
spin_unlock(&up->port.lock);
tty_flip_buffer_push(&port->state->port);
spin_lock(&up->port.lock);