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

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

Merge "diag: Update masks to peripherals in workqueue context"

parents a6c1b8e2 0422a763
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2135,6 +2135,14 @@ void diag_send_updates_peripheral(uint8_t peripheral)
				driver->real_time_mode[DIAG_LOCAL_PROC]);
		diag_send_peripheral_buffering_mode(
					&driver->buffering_mode[peripheral]);

		/*
		 * Clear mask_update variable afer updating
		 * logging masks to peripheral.
		 */
		mutex_lock(&driver->cntl_lock);
		driver->mask_update ^= PERIPHERAL_MASK(peripheral);
		mutex_unlock(&driver->cntl_lock);
	}
}

+1 −4
Original line number Diff line number Diff line
@@ -40,9 +40,6 @@ static void diag_mask_update_work_fn(struct work_struct *work)
	for (peripheral = 0; peripheral <= NUM_PERIPHERALS; peripheral++) {
		if (!(driver->mask_update & PERIPHERAL_MASK(peripheral)))
			continue;
		mutex_lock(&driver->cntl_lock);
		driver->mask_update ^= PERIPHERAL_MASK(peripheral);
		mutex_unlock(&driver->cntl_lock);
		diag_send_updates_peripheral(peripheral);
	}
}
@@ -834,7 +831,7 @@ static void process_diagid(uint8_t *buf, uint32_t len,
		 */
		if (root_str) {
			driver->diag_id_sent[peripheral] = 1;
			diag_send_updates_peripheral(peripheral);
			queue_work(driver->cntl_wq, &driver->mask_update_work);
		}
		fwd_info = &peripheral_info[TYPE_DATA][peripheral];
		diagfwd_buffers_init(fwd_info);