From nobody Tue Nov 18 10:39:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609343220; cv=none; d=zohomail.com; s=zohoarc; b=ILUu+SShI6ztNnb1Yjzv85RWJAMwnyugpeV8uIpH8KLoULB7lQc/1StMK1RJ5GRr3kLRLvIMkrNfUwuJKLDh20sv+8yT2CSsXwzytjXdxmckF0YrMpUxPL56v9UAa1I5dH3uwAJz9G9oHnwSNEW7C7bcJiIg4j42Tzl5Ozhm/1Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609343220; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lwrYhqO+9Q1xidEbS63hOnKpcCEyLLnF32ZYmnMUKKI=; b=Giwa4OYTCLWfQX+OpEJBQHTEH1aD39U5I/h2eI+ORD7PJGHdhmzhyPbkcYQTwQMZ3wi02TjzourZLhAL/3YvKkUCq93veD3xy6BoOKCkhQzBynk4yurxRg8T6ERx8ZpQrSxtsRFJZgnZegrly5i2u+thkq+1JpDS8Ctq8elNODM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160934322055293.41753010247339; Wed, 30 Dec 2020 07:47:00 -0800 (PST) Received: from localhost ([::1]:34196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kudgh-0001nT-8j for importer@patchew.org; Wed, 30 Dec 2020 10:46:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kudYO-0000Fj-6V for qemu-devel@nongnu.org; Wed, 30 Dec 2020 10:38:25 -0500 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:50748 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kudYI-0001zQ-DX for qemu-devel@nongnu.org; Wed, 30 Dec 2020 10:38:23 -0500 Received: from host86-148-34-1.range86-148.btcentralplus.com ([86.148.34.1] helo=kentang.home) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kudYH-00070L-0E; Wed, 30 Dec 2020 15:38:21 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, pbonzini@redhat.com, fam@euphon.net, laurent@vivier.eu Date: Wed, 30 Dec 2020 15:37:24 +0000 Message-Id: <20201230153745.30241-5-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201230153745.30241-1-mark.cave-ayland@ilande.co.uk> References: <20201230153745.30241-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 86.148.34.1 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH 04/25] esp: add PDMA trace events X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.uk0.bigv.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" This will become more useful later when trying to debug mixed FIFO and PDMA requests. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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(); } =20 static void esp_lower_drq(ESPState *s) { qemu_irq_lower(s->irq_data); + trace_esp_lower_drq(); } =20 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 =3D get_pdma_buf(s); =20 + trace_esp_pdma_write(size); + dmalen =3D s->rregs[ESP_TCLO]; dmalen |=3D s->rregs[ESP_TCMID] << 8; dmalen |=3D s->rregs[ESP_TCHI] << 16; @@ -903,6 +907,8 @@ static uint64_t sysbus_esp_pdma_read(void *opaque, hwad= dr addr, uint8_t *buf =3D get_pdma_buf(s); uint64_t val =3D 0; =20 + trace_esp_pdma_read(size); + if (s->pdma_len =3D=3D 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 c= ommand (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" --=20 2.20.1