[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/25] esp: add PDMA trace events
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 04/25] esp: add PDMA trace events |
Date: |
Wed, 30 Dec 2020 15:37:24 +0000 |
This will become more useful later when trying to debug mixed FIFO and PDMA
requests.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 6 ++++++
hw/scsi/trace-events | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index df15e3e7cf..619c3e9e28 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -63,11 +63,13 @@ static void esp_lower_irq(ESPState *s)
static void esp_raise_drq(ESPState *s)
{
qemu_irq_raise(s->irq_data);
+ trace_esp_raise_drq();
}
static void esp_lower_drq(ESPState *s)
{
qemu_irq_lower(s->irq_data);
+ trace_esp_lower_drq();
}
void esp_dma_enable(ESPState *s, int irq, int level)
@@ -866,6 +868,8 @@ static void sysbus_esp_pdma_write(void *opaque, hwaddr addr,
uint32_t dmalen;
uint8_t *buf = get_pdma_buf(s);
+ trace_esp_pdma_write(size);
+
dmalen = s->rregs[ESP_TCLO];
dmalen |= s->rregs[ESP_TCMID] << 8;
dmalen |= s->rregs[ESP_TCHI] << 16;
@@ -903,6 +907,8 @@ static uint64_t sysbus_esp_pdma_read(void *opaque, hwaddr
addr,
uint8_t *buf = get_pdma_buf(s);
uint64_t val = 0;
+ trace_esp_pdma_read(size);
+
if (s->pdma_len == 0) {
return 0;
}
diff --git a/hw/scsi/trace-events b/hw/scsi/trace-events
index 261eecf0cf..ed387dc7fd 100644
--- a/hw/scsi/trace-events
+++ b/hw/scsi/trace-events
@@ -159,8 +159,12 @@ esp_error_unhandled_command(uint32_t val) "unhandled
command (0x%2.2x)"
esp_error_invalid_write(uint32_t val, uint32_t addr) "invalid write of 0x%02x
at [0x%x]"
esp_raise_irq(void) "Raise IRQ"
esp_lower_irq(void) "Lower IRQ"
+esp_raise_drq(void) "Raise DREQ"
+esp_lower_drq(void) "Lower DREQ"
esp_dma_enable(void) "Raise enable"
esp_dma_disable(void) "Lower enable"
+esp_pdma_read(int size) "pDMA read %u bytes"
+esp_pdma_write(int size) "pDMA write %u bytes"
esp_get_cmd(uint32_t dmalen, int target) "len %d target %d"
esp_do_busid_cmd(uint8_t busid) "busid 0x%x"
esp_handle_satn_stop(uint32_t cmdlen) "cmdlen %d"
--
2.20.1
- [PATCH 00/25] esp: consolidate PDMA transfer buffers, Mark Cave-Ayland, 2020/12/30
- [PATCH 02/25] esp: add trace event when receiving a TI command, Mark Cave-Ayland, 2020/12/30
- [PATCH 01/25] esp: checkpatch fixes, Mark Cave-Ayland, 2020/12/30
- [PATCH 03/25] esp: fix esp_reg_read() trace event, Mark Cave-Ayland, 2020/12/30
- [PATCH 04/25] esp: add PDMA trace events,
Mark Cave-Ayland <=
- [PATCH 07/25] esp: introduce esp_get_stc(), Mark Cave-Ayland, 2020/12/30
- [PATCH 05/25] esp: determine transfer direction directly from SCSI phase, Mark Cave-Ayland, 2020/12/30
- [PATCH 06/25] esp: introduce esp_get_tc() and esp_set_tc(), Mark Cave-Ayland, 2020/12/30
- [PATCH 08/25] esp: apply transfer length adjustment when STC is zero at TC load time, Mark Cave-Ayland, 2020/12/30
- [PATCH 09/25] esp: remove dma_counter from ESPState, Mark Cave-Ayland, 2020/12/30
- [PATCH 10/25] esp: remove dma_left from ESPState, Mark Cave-Ayland, 2020/12/30
- [PATCH 11/25] esp: remove minlen restriction in handle_ti, Mark Cave-Ayland, 2020/12/30
- [PATCH 12/25] esp: introduce esp_pdma_read() and esp_pdma_write() functions, Mark Cave-Ayland, 2020/12/30
- [PATCH 14/25] esp: move pdma_len and TC logic into esp_pdma_read()/esp_pdma_write(), Mark Cave-Ayland, 2020/12/30
- [PATCH 13/25] esp: use pdma_origin directly in esp_pdma_read()/esp_pdma_write(), Mark Cave-Ayland, 2020/12/30