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

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

Merge "diag: NRT read wakelocks held for very long time"

parents 57e86e49 42cf0a95
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -394,7 +394,7 @@ void process_lock_on_notify(struct diag_nrt_wake_lock *lock)
	 * Do not work with ref_count here in case
	 * of spurious interrupt
	 */
	if (lock->enabled)
	if (lock->enabled && !wake_lock_active(&lock->read_lock))
		wake_lock(&lock->read_lock);
	spin_unlock_irqrestore(&lock->read_spinlock, read_lock_flags);
}
+7 −3
Original line number Diff line number Diff line
@@ -347,12 +347,17 @@ void diag_send_diag_mode_update_by_smd(struct diag_smd_info *smd_info,
	char buf[sizeof(struct diag_ctrl_msg_diagmode)];
	int msg_size = sizeof(struct diag_ctrl_msg_diagmode);
	int wr_size = -ENOMEM, retry_count = 0, timer;
	struct diag_smd_info *data = NULL;

	/* For now only allow the modem to receive the message */
	if (!smd_info || smd_info->type != SMD_CNTL_TYPE ||
		(smd_info->peripheral != MODEM_DATA))
		return;

	data = &driver->smd_data[smd_info->peripheral];
	if (!data)
		return;

	mutex_lock(&driver->diag_cntl_mutex);
	diagmode.ctrl_pkt_id = DIAG_CTRL_MSG_DIAGMODE;
	diagmode.ctrl_pkt_data_len = 36;
@@ -388,11 +393,9 @@ void diag_send_diag_mode_update_by_smd(struct diag_smd_info *smd_info,
				for (timer = 0; timer < 5; timer++)
					udelay(2000);
			} else {
				struct diag_smd_info *data =
				data =
				&driver->smd_data[smd_info->peripheral];
				driver->real_time_mode = real_time;
				process_lock_enabling(&data->nrt_lock,
								real_time);
				break;
			}
		}
@@ -404,6 +407,7 @@ void diag_send_diag_mode_update_by_smd(struct diag_smd_info *smd_info,
		pr_err("diag: ch invalid, feature update on proc %d\n",
				smd_info->peripheral);
	}
	process_lock_enabling(&data->nrt_lock, real_time);

	mutex_unlock(&driver->diag_cntl_mutex);
}