Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89bb3942 authored by Panicker Harish's avatar Panicker Harish
Browse files

serial: msm_geni_serial: Prevent excessive logging due to WARN_ON



When application layer is not reading Rx data fast
enough from tty buffers tty_insert can fail.

Whenever tty_insert fails continuously, existing WARN_ON
is resulting in excessive logging and leading to
watchdog bark.

Used WARN_ON_ONCE whenever tty_insert fails and also
when unexpected wake_up interrupts occur to prevent
excessive logging.

Change-Id: I2c59675bf23ebb2c441e5015139d1193023e05d9
Signed-off-by: default avatarVisweswara Tanuku <quic_vtanuku@quicinc.com>
Signed-off-by: default avatarPanicker Harish <quic_pharish@quicinc.com>
parent c2664cd1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2012,7 +2012,7 @@ static int msm_geni_serial_handle_dma_rx(struct uart_port *uport, bool drop_rx)
	if (ret != rx_bytes) {
		dev_err(uport->dev, "%s: ret %d rx_bytes %d\n",
			__func__, ret, rx_bytes);
		WARN_ON(1);
		WARN_ON_ONCE(1);
	}
	uport->icount.rx += ret;
	tty_flip_buffer_push(tport);
@@ -2367,7 +2367,7 @@ static irqreturn_t msm_geni_wakeup_isr(int isr, void *dev)
	if (!tty) {
		IPC_LOG_MSG(port->ipc_log_rx,
			    "%s: Unexpected wakeup ISR\n", __func__);
		WARN_ON(1);
		WARN_ON_ONCE(1);
		spin_unlock_irqrestore(&uport->lock, flags);
		return IRQ_HANDLED;
	}