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

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

Merge "coresight: stm: Fix master control issue"

parents 7079bbde be014993
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -176,6 +176,9 @@ static inline int __stm_trace(uint32_t flags, uint8_t entity_id,
	uint32_t ch;
	void __iomem *ch_addr;

	if (!(drvdata && drvdata->master_enable))
		return 0;

	/* allocate channel and get the channel address */
	ch = stm_channel_alloc();
	if (unlikely(ch >= drvdata->numsp)) {
@@ -226,9 +229,9 @@ int stm_trace(uint32_t flags, uint8_t entity_id, uint8_t proto_id,
	struct stm_drvdata *drvdata = stmdrvdata;

	/* we don't support sizes more than 24bits (0 to 23) */
	if (!(drvdata && drvdata->enable && drvdata->master_enable &&
	      test_bit(entity_id, drvdata->entities) && size &&
	      (size < 0x1000000)))
	if (!(drvdata && drvdata->enable &&
	    test_bit(entity_id, drvdata->entities) &&
	    size && (size < 0x1000000)))
		return 0;

	return __stm_trace(flags, entity_id, proto_id, data, size);
+3 −0
Original line number Diff line number Diff line
@@ -367,6 +367,9 @@ static ssize_t notrace stm_generic_packet(struct stm_data *stm_data,
	if (!(drvdata && local_read(&drvdata->mode)))
		return -EACCES;

	if (!drvdata->master_enable)
		return -EPERM;

	if (channel >= drvdata->numsp)
		return -EINVAL;