[PATCH v2 0/2] hwtracing: hisi_ptt: Fix reset timeout handling and clean up trace start

Pradhan, Sanman posted 2 patches 2 months ago
drivers/hwtracing/ptt/hisi_ptt.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
[PATCH v2 0/2] hwtracing: hisi_ptt: Fix reset timeout handling and clean up trace start
Posted by Pradhan, Sanman 2 months ago
From: Sanman Pradhan <psanman@juniper.net>

Patch 1: Propagate the DMA reset timeout error from
  hisi_ptt_wait_dma_reset_done() instead of discarding it. De-assert
  the reset bit and log an error on timeout. Move ctrl->started to the
  successful path so a failed start does not leave the trace marked as
  active.

Patch 2: Remove the unnecessary 16 MiB memset of trace buffers in
  hisi_ptt_trace_start(). The driver only copies data that hardware has
  written, so the zeroing is not needed.

Changes since v1:
  - Patch 1: Return bool from hisi_ptt_wait_dma_reset_done() for
    consistency with the other wait helpers
  - Patch 1: Add pci_err() on timeout
  - Patch 1: De-assert RST before returning on timeout
  - Patch 1: Move ctrl->started to the successful path
  - Dropped "Use the passed buffer index in hisi_ptt_update_aux()" patch
  - Patch 2 is unchanged

Sanman Pradhan (2):
  hwtracing: hisi_ptt: Propagate DMA reset timeout in trace_start()
  hwtracing: hisi_ptt: Remove unnecessary trace buffer zeroing in
    trace_start()

 drivers/hwtracing/ptt/hisi_ptt.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

-- 
2.34.1

Re: [PATCH v2 0/2] hwtracing: hisi_ptt: Fix reset timeout handling and clean up trace start
Posted by Jonathan Cameron 1 month, 4 weeks ago
On Tue, 14 Apr 2026 17:25:03 +0000
"Pradhan, Sanman" <sanman.pradhan@hpe.com> wrote:

> From: Sanman Pradhan <psanman@juniper.net>
+CC Sizhe Liu

> 
> Patch 1: Propagate the DMA reset timeout error from
>   hisi_ptt_wait_dma_reset_done() instead of discarding it. De-assert
>   the reset bit and log an error on timeout. Move ctrl->started to the
>   successful path so a failed start does not leave the trace marked as
>   active.
> 
> Patch 2: Remove the unnecessary 16 MiB memset of trace buffers in
>   hisi_ptt_trace_start(). The driver only copies data that hardware has
>   written, so the zeroing is not needed.
> 
> Changes since v1:
>   - Patch 1: Return bool from hisi_ptt_wait_dma_reset_done() for
>     consistency with the other wait helpers
>   - Patch 1: Add pci_err() on timeout
>   - Patch 1: De-assert RST before returning on timeout
>   - Patch 1: Move ctrl->started to the successful path
>   - Dropped "Use the passed buffer index in hisi_ptt_update_aux()" patch
>   - Patch 2 is unchanged
> 
> Sanman Pradhan (2):
>   hwtracing: hisi_ptt: Propagate DMA reset timeout in trace_start()
>   hwtracing: hisi_ptt: Remove unnecessary trace buffer zeroing in
>     trace_start()
> 
>  drivers/hwtracing/ptt/hisi_ptt.c | 25 +++++++++++++------------
>  1 file changed, 13 insertions(+), 12 deletions(-)
>