From nobody Tue Feb 10 04:08:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) client-ip=209.85.128.54; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f54.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1626037873; cv=none; d=zohomail.com; s=zohoarc; b=OQD5BeHiy+TtoWd9zTlWn4Xmy8/jX8EehGbqwceFfy4rq57OwpRIAyFvcRKS1gl9rN13vzzWAzTMtd1bILdW7qK3iZtaREjKI9eIg+qnxwlNUIDqPZaUy0uiOHwWhP/51qHryz6+FjJ0f1c8DfKQXYD1gbVTpUJYGS3OzG+MiSo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626037873; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9b99qKkXqy4QpriYCi8x0HuIidGuJL8c4prBnCRgJws=; b=X4qyNRoLMUqdlkfT0fWPFbXbeSBkfF2Q72a8gbaoaBMV7IlKPTkOzC5s78hgJ9G3GBFRy5ku3yeF7cG6QHN63sA3LoZQDha/RfpE7Bnn5Fua0yANOUoVoZ8RJgp9OzcL6ujhYB248VU5+RQk9Lj3h021G7vqS6yblKFjpQeNgBU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.zohomail.com with SMTPS id 1626037873816774.1392337000959; Sun, 11 Jul 2021 14:11:13 -0700 (PDT) Received: by mail-wm1-f54.google.com with SMTP id b14-20020a1c1b0e0000b02901fc3a62af78so12892127wmb.3 for ; Sun, 11 Jul 2021 14:11:13 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (abayonne-654-1-142-116.w86-222.abo.wanadoo.fr. [86.222.93.116]) by smtp.gmail.com with ESMTPSA id b12sm12305034wrx.60.2021.07.11.14.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jul 2021 14:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9b99qKkXqy4QpriYCi8x0HuIidGuJL8c4prBnCRgJws=; b=lQOS89ovG4IC82kq80G3tHBqOIahtLrTUN7pt9z+nih0+FpwqWbv6ut6BWDSS7PCAB TiMxnWb/7zzpMI/woeulirTZOlcO4CKloIFlVud+HnTqbJ1my3NR3Eaoo1tugOnYCLel KeWjCAbaPfktZsgcMYqcuxlGXwRodw9Qg8gt6AoMoofsssBP/3QUKweqBfLnikI0NWdP scXeE1Kl6ajufsi7ZAEbXdMLCthGYY0YEfrZOoul60EsdHYu4O1SC2lD+5tXgY5JTU4w UJnuxTVdzOOe4EHUqgxyhuHh3Pr8B5bAIlX4+6i/qYlT17eb6mMgJdggCB6URUpbelJg 7hnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=9b99qKkXqy4QpriYCi8x0HuIidGuJL8c4prBnCRgJws=; b=jIxye8oDYvFIq1PHo8vEgdGIZUWA2o2GD6XKoUzMp7SwOkXwSeKDn9/dg1rV3nzTwB jvm+SZJMQ+DfzrgrtFOLutKwIkLUR0e5a3Va5thTYO1Z7wkcs8ZtdpY9MEP7ztIkSipu jKcnVBO/ACHWKzyvKwOieHmBisUmGVl1/UlyVUiLF1DpVG3OoBT9S9iy71t8F2adEG8p rSlrB8Jn2+Gvp3OFzi6RMPPKOQtN/YfNDy9Whhs7OAHkqlg1l0qMmACEQYY6yy6yFc5H 4rqWbdqOrRyNrPF4MT1IxgucWFMolJ81oNM2KZL7RY7mA99hupwTzVNzJzpg+PLTn5eW djKw== X-Gm-Message-State: AOAM532XE7C6yvMqB9L9TtJsQy95VHsjC+JCVJMPjPyGGrIhFSXlH33d nW6CnJosvy+TsM79XGd8MUo= X-Google-Smtp-Source: ABdhPJxnfZSy4hBwqrJmhtGA+aFtv96ZDZrCJiAn/XlE5OyXiL4weD1PG9qmQEyD9YyzwMgNwe1Uyw== X-Received: by 2002:a7b:ce82:: with SMTP id q2mr10613546wmj.60.1626037872104; Sun, 11 Jul 2021 14:11:12 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bin Meng , Alexander Bulekov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bin Meng Subject: [PULL 1/4] hw/sd/sdcard: When card is in wrong state, log which state it is Date: Sun, 11 Jul 2021 23:10:54 +0200 Message-Id: <20210711211057.2714586-2-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210711211057.2714586-1-f4bug@amsat.org> References: <20210711211057.2714586-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1626037874248100001 We report the card is in an inconsistent state, but don't precise in which state it is. Add this information, as it is useful when debugging problems. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-2-f4bug@amsat.org> Reviewed-by: Alexander Bulekov --- hw/sd/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 282d39a7042..d8fdf84f4db 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1504,7 +1504,8 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, S= DRequest req) return sd_illegal; } =20 - qemu_log_mask(LOG_GUEST_ERROR, "SD: CMD%i in a wrong state\n", req.cmd= ); + qemu_log_mask(LOG_GUEST_ERROR, "SD: CMD%i in a wrong state: %s\n", + req.cmd, sd_state_name(sd->state)); return sd_illegal; } =20 --=20 2.31.1