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

Commit 0e58f484 authored by Dilip Kota's avatar Dilip Kota
Browse files

msm_serial_hs_lite: Remove kernel panic



Do not use panic() when tx operation timeouts, which
leads to kernel panic causing crash.
Instead of panic which effects the driver stability,
resetting the transmitter will work good and keep
transmitting the data.

CRs-Fixed: 578961
Change-Id: I3449cf152cecb1d557b24f770e4fb71e1f2bde00
Signed-off-by: default avatarDilip Kota <c_dkota@codeaurora.org>
parent 0f8fb3e5
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -1411,8 +1411,13 @@ static void wait_for_xmitr(struct uart_port *port)
			touch_nmi_watchdog();
			touch_nmi_watchdog();
			cpu_relax();
			cpu_relax();
			if (++count == msm_hsl_port->tx_timeout) {
			if (++count == msm_hsl_port->tx_timeout) {
				pr_info("%s: UART TX Stuck, Resetting TX\n",
								 __func__);
				msm_hsl_write(port, RESET_TX,
					regmap[vid][UARTDM_CR]);
				mb();
				dump_hsl_regs(port);
				dump_hsl_regs(port);
				panic("MSM HSL wait_for_xmitr is stuck!");
				break;
			}
			}
		}
		}
		msm_hsl_write(port, CLEAR_TX_READY, regmap[vid][UARTDM_CR]);
		msm_hsl_write(port, CLEAR_TX_READY, regmap[vid][UARTDM_CR]);