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

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

Merge "Revert "diag: Clear memory device entries during mhi disconnect""

parents 0bda4dbe aaba47a0
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -288,19 +288,13 @@ int diag_md_copy_to_user(char __user *buf, int *pret, size_t buf_size,
		if (!ch->md_info_inited)
			continue;
		for (j = 0; j < ch->num_tbl_entries && !err; j++) {
			spin_lock_irqsave(&ch->lock, flags);
			entry = &ch->tbl[j];
			if (entry->len <= 0 || entry->buf == NULL) {
				spin_unlock_irqrestore(&ch->lock, flags);
			if (entry->len <= 0 || entry->buf == NULL)
				continue;
			}

			peripheral = diag_md_get_peripheral(entry->ctx);
			if (peripheral < 0) {
				spin_unlock_irqrestore(&ch->lock, flags);
			if (peripheral < 0)
				goto drop_data;
			}
			spin_unlock_irqrestore(&ch->lock, flags);
			session_info =
			diag_md_session_get_peripheral(i, peripheral);
			if (!session_info)
+0 −14
Original line number Diff line number Diff line
@@ -293,20 +293,6 @@ int diag_mux_close_peripheral(int proc, uint8_t peripheral)
	return 0;
}

int diag_mux_close_device(int proc)
{
	struct diag_logger_t *logger = NULL;

	if (!diag_mux)
		return -EIO;

	logger = diag_mux->logger[proc];

	if (logger && logger->log_ops && logger->log_ops->close_device)
		logger->log_ops->close_device(proc);
	return 0;
}

int diag_mux_switch_logging(int proc, int *req_mode, int *peripheral_mask)
{
	unsigned int new_mask = 0;
+0 −1
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@ int diag_mux_register(int proc, int ctx, struct diag_mux_ops *ops);
int diag_mux_queue_read(int proc);
int diag_mux_write(int proc, unsigned char *buf, int len, int ctx);
int diag_mux_close_peripheral(int proc, uint8_t peripheral);
int diag_mux_close_device(int proc);
int diag_mux_open_all(struct diag_logger_t *logger);
int diag_mux_close_all(void);
int diag_pcie_register_ops(int proc, int ctx, struct diag_mux_ops *ops);
+0 −3
Original line number Diff line number Diff line
@@ -176,10 +176,7 @@ int diag_remote_dev_open(int id)

void diag_remote_dev_close(int id)
{
	if (id < 0 || id >= NUM_REMOTE_DEV)
		return;

	diag_mux_close_device(BRIDGE_TO_MUX(id));
}

int diag_remote_dev_read_done(int id, unsigned char *buf, int len)