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

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

Merge "soc: spcom: fix sleep only on pending send command"

parents 13d06c54 62cc358f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -643,6 +643,8 @@ static int spcom_handle_send_command(struct spcom_channel *ch,
		}
		/* may fail when RX intent not queued by SP */
		ret = rpmsg_trysend(ch->rpdev->ept, tx_buf, tx_buf_size);
		if (ret == 0)
			break;
		time_msec += TX_RETRY_DELAY_MSEC;
		mutex_unlock(&ch->lock);
		msleep(TX_RETRY_DELAY_MSEC);
@@ -845,6 +847,8 @@ static int spcom_handle_send_modified_command(struct spcom_channel *ch,
		}
		/* may fail when RX intent not queued by SP */
		ret = rpmsg_trysend(ch->rpdev->ept, tx_buf, tx_buf_size);
		if (ret == 0)
			break;
		time_msec += TX_RETRY_DELAY_MSEC;
		mutex_unlock(&ch->lock);
		msleep(TX_RETRY_DELAY_MSEC);