From patchwork Fri Jun 28 04:53:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 808130 Delivered-To: patch@linaro.org Received: by 2002:adf:fe0a:0:b0:362:4979:7f74 with SMTP id n10csp187862wrr; Thu, 27 Jun 2024 21:55:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWG5Rp2ATL3+tDPqQ2s6r1cm5NFpfUWgYLMP+EZOj03p5zIrDJGk3LtxoNtzB1A7Yz2qt5+Lv7NPovigL3UjDKo X-Google-Smtp-Source: AGHT+IGLP+xHZ0EezcLgawzsX3N74zu0HSrnMpxluNBUh3RkaFpXFL8+JKHY5KL3t9lOhGiRouc2 X-Received: by 2002:ac8:5712:0:b0:446:51f3:1869 with SMTP id d75a77b69052e-44651f31da6mr12510661cf.29.1719550545866; Thu, 27 Jun 2024 21:55:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719550545; cv=none; d=google.com; s=arc-20160816; b=z4on9o/HbuXzZQnIEI+bGqzbSQRpUJpGxYxmlk4v5Y5cWD3iMqI+U+rpO8e37JJQOu 5zv6HFma6uQzsLBbBvudpPicwq9nfB9PfJLh961kbF0Ry3TF/ptmdYGJqfojeAMEDM+V r+VVHxzYYn9nSwo1e4MoxyefBOnWgRA8bVfpWfgrrmfahS2ubx1x0eiGc3K2jahfHtdC TinS79uhYQJmQA9JIOs6AhII/4efnDu5rnnu1nfhV8wYIyjuxgcohBZk9eOlEdFvacH1 k5d36MG8zxZqDMQrGuDXx64sg2Wnkme5zgdrIsvWP9G0BKZM2tpjeY8ZzRGRWMJwKFDd 85Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=G214GiZ6GoHQbuSVeY1gM0sNgUJBhdD0Klfne+Cmhik=; fh=mJ33vrhGd/NTdd5lBDp0lE29qLMBB1Ua1MFYaTj7EB4=; b=gmDy/fZzC17rBS5qjghE0zJwr5RiewwwXwifpG56SmbMHb2dkFuZ8GB3z3awYceynf 1Xw9F4D4rutXH5uAYdkaN9LNnBmJAXINZFXwAWBeeElGqQ1BVjfgD1cgAQ8hPH/4dKyi Vnh92gKRj/MCm6+l7s73340ajGZz4ZAUMv1H6d+yyyjxqgEO/2vnLjsVhdSSakNYdi2i eU+aj4Yg7JX8kjUb8XY66C+HfPgkeGIhogRVwFM52jJCRQFJPDM3AANHxaYNwTs5R+h8 v4dcGhzDrdBBLFNylDQ8vHmBhbRf4iLhqBpHFY23sUqTjfYxDHzQWnYIZhE1/fAb9jKV cpwg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="RnU/JVJe"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-446514c6786si10990291cf.629.2024.06.27.21.55.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Jun 2024 21:55:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="RnU/JVJe"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sN3dN-0000ki-5z; Fri, 28 Jun 2024 00:54:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sN3dF-0000Lg-F1 for qemu-devel@nongnu.org; Fri, 28 Jun 2024 00:54:46 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sN3d7-00016e-14 for qemu-devel@nongnu.org; Fri, 28 Jun 2024 00:54:39 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-362bc731810so153381f8f.1 for ; Thu, 27 Jun 2024 21:54:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719550474; x=1720155274; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G214GiZ6GoHQbuSVeY1gM0sNgUJBhdD0Klfne+Cmhik=; b=RnU/JVJeMCLHmjCZE4W6ZnLLOqT4Dq9HEqJ8Oym3k87zOF+JF50Djm82F2DP8WTCjJ NyBfoICtIbf6LYAwKSNFDUahlhhMu4glmj2s+XjL7VHXGSMoEmMUbHdniUd3eEeIVmqC eLMgr8JxGw3GunIYUdGpdK4G/D0Oeuy08dNdNVueyEn3kPPKylf8kGU7xWz/zzZmAk6b a9uoIAVm0ztcBeTTMBBT/RTWpNIIKXZ+Pji9mAs52O6w4FzimyFzIpHcZdFmimyu2lm3 jcUHGEu1sm259k7jyATJhUUg/s0XykLQgL47Crl67YXhmgbzvr24QqJvLLrScuhUf12S ZRog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719550474; x=1720155274; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G214GiZ6GoHQbuSVeY1gM0sNgUJBhdD0Klfne+Cmhik=; b=MSIMkAK9Hvl0tDcFWOyGy2/XLRhopVrZyXJHgGCAIeE6np7NwX238t/WfydJKsCZff ctdQRhUHM0NplWCOH3TWFVVPHuDy7Zgmjm10EXK5AmEpOS1x5Xr9Kn7fZ6NAdU00xTg8 +7bWCwL4TW3iWOLLJv5qdnt2Ud/O6asmQnPCc1ZenxnGkAgaLCMTfMOr22bz4jOZkQsw opAioRKQ71E794U5Wv3/RPI84yHumdjvbV5LtdgaMDU8ajLZ9TkhM5IVuylZ8H/lcByz B1IfNEArNA7nTIOixjgZYZUbWPvhfA8YKaBttbwR3rrr1RLrvuH2YwyR6ylQAZo7VSvX TxOA== X-Gm-Message-State: AOJu0Yxs1ezdpj8Gadwxy680uFEyvlVYfJ/Fx7EoMHtoAN9DjRlINc2J rqItny/tb4yZQvE+LWvfQgKfOif72BySedK1IMM7+QuN6L2tMRulV3zRmBu2glTgkn2NkBybUve P/LuoAA== X-Received: by 2002:a5d:4b87:0:b0:366:f04d:676f with SMTP id ffacd0b85a97d-366f04d68f9mr11382349f8f.12.1719550473957; Thu, 27 Jun 2024 21:54:33 -0700 (PDT) Received: from m1x-phil.lan (cho94-h02-176-184-4-239.dsl.sta.abo.bbox.fr. [176.184.4.239]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0ce6c9sm1077729f8f.22.2024.06.27.21.54.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 27 Jun 2024 21:54:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Luc Michel , Francisco Iglesias , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Sai Pavan Boddu , Joel Stanley , Bin Meng , qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 12/12] hw/sd/sdcard: Trace length of data read on DAT lines Date: Fri, 28 Jun 2024 06:53:23 +0200 Message-ID: <20240628045323.86308-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240627164815.82606-1-philmd@linaro.org> References: <20240627164815.82606-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Some commands expect less than BLOCK_LENGTH. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 4 ++-- hw/sd/trace-events | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 64621d4340..a0da06e017 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -2197,8 +2197,8 @@ uint8_t sd_read_byte(SDState *sd) io_len = sd_blk_len(sd); trace_sdcard_read_data(sd->proto->name, - sd->last_cmd_name, - sd->current_cmd, sd->data_offset, io_len); + sd->last_cmd_name, sd->current_cmd, + sd->data_offset, sd->data_size, io_len); switch (sd->current_cmd) { case 6: /* CMD6: SWITCH_FUNCTION */ case 9: /* CMD9: SEND_CSD */ diff --git a/hw/sd/trace-events b/hw/sd/trace-events index 6a51b0e906..5dfe6be7b7 100644 --- a/hw/sd/trace-events +++ b/hw/sd/trace-events @@ -55,7 +55,7 @@ sdcard_req_addr(uint32_t req_arg, uint64_t addr) "req 0x%" PRIx32 " addr 0x%" PR sdcard_read_block(uint64_t addr, uint32_t len) "addr 0x%" PRIx64 " size 0x%x" sdcard_write_block(uint64_t addr, uint32_t len) "addr 0x%" PRIx64 " size 0x%x" sdcard_write_data(const char *proto, const char *cmd_desc, uint8_t cmd, uint32_t offset, uint8_t value) "%s %20s/ CMD%02d ofs %"PRIu32" value 0x%02x" -sdcard_read_data(const char *proto, const char *cmd_desc, uint8_t cmd, uint32_t offset, uint32_t length) "%s %20s/ CMD%02d ofs %"PRIu32" len %" PRIu32 +sdcard_read_data(const char *proto, const char *cmd_desc, uint8_t cmd, uint32_t offset, uint64_t size, uint32_t blklen) "%s %20s/ CMD%02d ofs %"PRIu32" size %"PRIu64" blklen %" PRIu32 sdcard_set_voltage(uint16_t millivolts) "%u mV" # pxa2xx_mmci.c