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

Commit e666eec9 authored by Chandana Kishori Chiluveru's avatar Chandana Kishori Chiluveru Committed by Gerrit - the friendly Code Review server
Browse files

serial: msm_geni_serial: Do not check_transfers_inflight() post port_close



When port is closed, Currently driver calls wait_for_transfers_inflight()
function to check for pending transfers. During this
check_transfers_inflight operation their a possibility to see
RX line data in DMA_RX_LENGTH_IN register counter and can lead
to introduce additional delays during shutdown.

This patch checking for RX_ACTIVE state. If RX is active then
only wait for transfers_inflight.

Change-Id: I2b0647ce64d8c24e0161d07dd761fa9671defded
Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
parent f94ba33e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -299,6 +299,12 @@ static void wait_for_transfers_inflight(struct uart_port *uport)
{
	int iter = 0;
	struct msm_geni_serial_port *port = GET_DEV_PORT(uport);
	unsigned int geni_status;

	geni_status = geni_read_reg_nolog(uport->membase, SE_GENI_STATUS);
	/* Possible stop rx is called before this. */
	if (!(geni_status & S_GENI_CMD_ACTIVE))
		return;

	while (iter < WAIT_XFER_MAX_ITER) {
		if (check_transfers_inflight(uport)) {