Message ID | 20250507063716.1945213-1-quic_jinlmao@quicinc.com |
---|---|
State | New |
Headers | show |
Series | [v2] coresight: tmc: fix failure to disable/enable ETF after reading | expand |
On Tue, 06 May 2025 23:37:16 -0700, Mao Jinlong wrote: > ETF may fail to re-enable after reading, and driver->reading will > not be set to false, this will cause failure to enable/disable to ETF. > This change set driver->reading to false even if re-enabling fail. > > Applied, thanks! [1/1] coresight: tmc: fix failure to disable/enable ETF after reading https://git.kernel.org/coresight/c/d23bc38e Best regards,
diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c index d858740001c2..c9e2d95ae295 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c @@ -747,7 +747,6 @@ int tmc_read_unprepare_etb(struct tmc_drvdata *drvdata) char *buf = NULL; enum tmc_mode mode; unsigned long flags; - int rc = 0; /* config types are set a boot time and never change */ if (WARN_ON_ONCE(drvdata->config_type != TMC_CONFIG_TYPE_ETB && @@ -773,11 +772,7 @@ int tmc_read_unprepare_etb(struct tmc_drvdata *drvdata) * can't be NULL. */ memset(drvdata->buf, 0, drvdata->size); - rc = __tmc_etb_enable_hw(drvdata); - if (rc) { - raw_spin_unlock_irqrestore(&drvdata->spinlock, flags); - return rc; - } + __tmc_etb_enable_hw(drvdata); } else { /* * The ETB/ETF is not tracing and the buffer was just read.