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

Commit 4505fbf1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa4: Fix teth_bridge disconnect method with the pm"

parents 700f9b33 45653fe4
Loading
Loading
Loading
Loading
+54 −2
Original line number Diff line number Diff line
@@ -683,6 +683,11 @@ int ipa_pm_register(struct ipa_pm_register_params *params, u32 *hdl)
{
	struct ipa_pm_client *client;

	if (ipa_pm_ctx == NULL) {
		IPA_PM_ERR("PM_ctx is null\n");
		return -EINVAL;
	}

	if (params == NULL || hdl == NULL || params->name == NULL) {
		IPA_PM_ERR("Invalid Params\n");
		return -EINVAL;
@@ -749,6 +754,11 @@ int ipa_pm_deregister(u32 hdl)
	int i;
	unsigned long flags;

	if (ipa_pm_ctx == NULL) {
		IPA_PM_ERR("PM_ctx is null\n");
		return -EINVAL;
	}

	if (hdl >= IPA_PM_MAX_CLIENTS) {
		IPA_PM_ERR("Invalid Param\n");
		return -EINVAL;
@@ -806,6 +816,11 @@ int ipa_pm_associate_ipa_cons_to_client(u32 hdl, enum ipa_client_type consumer)
{
	int idx;

	if (ipa_pm_ctx == NULL) {
		IPA_PM_ERR("PM_ctx is null\n");
		return -EINVAL;
	}

	if (hdl >= IPA_PM_MAX_CLIENTS || consumer < 0 ||
		consumer >= IPA_CLIENT_MAX) {
		IPA_PM_ERR("invalid params\n");
@@ -924,6 +939,11 @@ static int ipa_pm_activate_helper(struct ipa_pm_client *client, bool sync)
 */
int ipa_pm_activate(u32 hdl)
{
	if (ipa_pm_ctx == NULL) {
		IPA_PM_ERR("PM_ctx is null\n");
		return -EINVAL;
	}

	if (hdl >= IPA_PM_MAX_CLIENTS || ipa_pm_ctx->clients[hdl] == NULL) {
		IPA_PM_ERR("Invalid Param\n");
		return -EINVAL;
@@ -941,6 +961,11 @@ int ipa_pm_activate(u32 hdl)
 */
int ipa_pm_activate_sync(u32 hdl)
{
	if (ipa_pm_ctx == NULL) {
		IPA_PM_ERR("PM_ctx is null\n");
		return -EINVAL;
	}

	if (hdl >= IPA_PM_MAX_CLIENTS || ipa_pm_ctx->clients[hdl] == NULL) {
		IPA_PM_ERR("Invalid Param\n");
		return -EINVAL;
@@ -961,6 +986,11 @@ int ipa_pm_deferred_deactivate(u32 hdl)
	struct ipa_pm_client *client;
	unsigned long flags;

	if (ipa_pm_ctx == NULL) {
		IPA_PM_ERR("PM_ctx is null\n");
		return -EINVAL;
	}

	if (hdl >= IPA_PM_MAX_CLIENTS || ipa_pm_ctx->clients[hdl] == NULL) {
		IPA_PM_ERR("Invalid Param\n");
		return -EINVAL;
@@ -1008,6 +1038,11 @@ int ipa_pm_deactivate_all_deferred(void)
	struct ipa_pm_client *client;
	unsigned long flags;

	if (ipa_pm_ctx == NULL) {
		IPA_PM_ERR("PM_ctx is null\n");
		return -EINVAL;
	}

	for (i = 0; i < IPA_PM_MAX_CLIENTS; i++) {
		client = ipa_pm_ctx->clients[i];

@@ -1061,13 +1096,19 @@ int ipa_pm_deactivate_all_deferred(void)
 */
int ipa_pm_deactivate_sync(u32 hdl)
{
	struct ipa_pm_client *client = ipa_pm_ctx->clients[hdl];
	struct ipa_pm_client *client;
	unsigned long flags;

	if (ipa_pm_ctx == NULL) {
		IPA_PM_ERR("PM_ctx is null\n");
		return -EINVAL;
	}

	if (hdl >= IPA_PM_MAX_CLIENTS || ipa_pm_ctx->clients[hdl] == NULL) {
		IPA_PM_ERR("Invalid Param\n");
		return -EINVAL;
	}
	client = ipa_pm_ctx->clients[hdl];

	cancel_delayed_work_sync(&client->deactivate_work);

@@ -1111,6 +1152,11 @@ int ipa_pm_handle_suspend(u32 pipe_bitmask)
	struct ipa_pm_client *client;
	bool client_notified[IPA_PM_MAX_CLIENTS] = { false };

	if (ipa_pm_ctx == NULL) {
		IPA_PM_ERR("PM_ctx is null\n");
		return -EINVAL;
	}

	IPA_PM_DBG_LOW("bitmask: %d",  pipe_bitmask);

	if (pipe_bitmask == 0)
@@ -1146,14 +1192,20 @@ int ipa_pm_handle_suspend(u32 pipe_bitmask)
 */
int ipa_pm_set_perf_profile(u32 hdl, int throughput)
{
	struct ipa_pm_client *client = ipa_pm_ctx->clients[hdl];
	struct ipa_pm_client *client;
	unsigned long flags;

	if (ipa_pm_ctx == NULL) {
		IPA_PM_ERR("PM_ctx is null\n");
		return -EINVAL;
	}

	if (hdl >= IPA_PM_MAX_CLIENTS || ipa_pm_ctx->clients[hdl] == NULL
		|| throughput < 0) {
		IPA_PM_ERR("Invalid Params\n");
		return -EINVAL;
	}
	client = ipa_pm_ctx->clients[hdl];

	mutex_lock(&ipa_pm_ctx->client_mutex);
	if (client->group == IPA_PM_GROUP_DEFAULT)
+2 −1
Original line number Diff line number Diff line
@@ -128,7 +128,8 @@ int ipa3_teth_bridge_disconnect(enum ipa_client_type client)
			TETH_ERR("fail to deactivate modem %d\n", res);
			return res;
		}
		res = ipa_pm_destroy();
		res = ipa_pm_deregister(ipa3_teth_ctx->modem_pm_hdl);
		ipa3_teth_ctx->modem_pm_hdl = ~0;
	} else {
		ipa_rm_delete_dependency(IPA_RM_RESOURCE_USB_PROD,
					IPA_RM_RESOURCE_Q6_CONS);