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

Commit ad9873ac authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "serial: msm_geni_serial: Bailout from suspend if RX data is pending"

parents 4f9622df 89cd0661
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1492,6 +1492,7 @@ static int stop_rx_sequencer(struct uart_port *uport)
	bool is_rx_active;
	unsigned int stale_delay;
	u32 dma_rx_status, s_irq_status;
	int usage_count;

	IPC_LOG_MSG(port->ipc_log_misc, "%s\n", __func__);

@@ -1535,6 +1536,15 @@ static int stop_rx_sequencer(struct uart_port *uport)
			IPC_LOG_MSG(port->ipc_log_misc, "%s: Interrupt delay\n",
					 __func__);
			handle_rx_dma_xfer(s_irq_status, uport);
			if (!port->ioctl_count) {
				usage_count = atomic_read(
						&uport->dev->power.usage_count);
				IPC_LOG_MSG(port->ipc_log_misc,
					"%s: Abort Stop Rx, extend the PM timer, usage_count:%d\n",
					__func__, usage_count);
				pm_runtime_mark_last_busy(uport->dev);
				return -EBUSY;
			}
		}
	}