From nobody Mon Feb 9 13:03:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.49 as permitted sender) client-ip=209.85.221.49; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f49.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1624471231; cv=none; d=zohomail.com; s=zohoarc; b=frfZVu5Kqxv9ZfxS0nFT5HBOuDXOLcrgLOvlEyoJ6SD3Y35beM0xb+2wgu1SQATRwAxU5BN7byMJp6UKURGvXZHDCBYcjqSdiZbtAe9/B3dkTF6TXy9gEBWZl3CkZhtE64Ca7IS8k+dpyOrxZNT403fuWa/wM6tjxHyz6IYYNj4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624471231; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lMmhRwq9QVb+vgT29BBDohmtThFIC9uWaH3/0GE7Ov0=; b=gGUXWcx8pfJB6xjCpjQT4zsDhyElm0vqVsPvCoiqM767Tjup5b8OPPgfkAobfyvuUjU1cmmXWF5CYeGbVxkFfgkWnYV4s9hfRJBMUEObY+tfY1wjnD0nnGSUgqMmEMsExSChEY/IrjZAkWGVYyG4Xc+iMS7kgX+/E6MXU3YLGXo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.zohomail.com with SMTPS id 1624471231091737.4043443378995; Wed, 23 Jun 2021 11:00:31 -0700 (PDT) Received: by mail-wr1-f49.google.com with SMTP id j1so3607483wrn.9 for ; Wed, 23 Jun 2021 11:00:30 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id c7sm696213wrs.23.2021.06.23.11.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 11:00:28 -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=lMmhRwq9QVb+vgT29BBDohmtThFIC9uWaH3/0GE7Ov0=; b=bh+ClY8VUhaPLuvBFEgVFlRahJrlwaAHhl3CfRlHqsoiLyrEQsEDIbmKYE+HwKDrgt 9zWbeMt1jCOHfPWUUhUmlkE5EnT9E7nrdtFfRJ0453XvwuOuu7VxjQTJDEbQdqAdy/s3 a47Vs17r9ONSjhIVteeQ0FDS3A5rvdjdtO+CfUbOgmfDbqM2xQJmFcgurz5yOEnLkEvp A8UBj2JRy8wavuiQiuVak1ztm5fo7U10VVk43o93yVlRvA+8gVtzx1eGaPIZtru5gQGw Thv6yf5CpJxiBY9i3ic4Q6246UcDaCBwhlnWrFmXifx9RCjHjN7DV42iAkC0ksGMC5Qa eo8Q== 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=lMmhRwq9QVb+vgT29BBDohmtThFIC9uWaH3/0GE7Ov0=; b=M11CnkgvItj765IxG6xDiX7JhovdCiHCJdCG2kdBAz2TXpM4bUvseRBin2jcpy5IXQ mtqkWDxA9qxy4mZEfoto9rowdhULYrahYnKFD2Tp0oX6M12U/8LrPHmppsezIvWTHu6I GieVK0mUSPb1652XCPKeJAjiIf+65tSSe3bzA2i4oXl3bovv9Oe8btZGwhWXTKdTZCrw 8DpltFFPIuPGo5bCeQ/Egzzru7XrZsPSE2vhA1iHDQpnZAZry3pCPXtn0w6mXYVrse5e vwsNxyneyzckUqBNh3bpQedjd/c1Ho73l6aCtjAmg7eCLXpuZe+4v3lmLI8r/zkTZHDG 4ajw== X-Gm-Message-State: AOAM533/t7ozbDh0gdaRJZYU9NTAcAv5dwtkxRXPkIE/Zz5mY9tX9SnE fHcbMsT8B+wiWio15qAr8tI= X-Google-Smtp-Source: ABdhPJzNzML8bMPJuTWtDxWPdvHYWG3KtTl6zdLsJC0DtYFzgEnMtFSAtlhZ7q71NWw40C0HxC6HXA== X-Received: by 2002:adf:d1c9:: with SMTP id b9mr1526373wrd.101.1624471229358; Wed, 23 Jun 2021 11:00:29 -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: Alexander Bulekov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Tom Yan , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Niek Linnenbank , =?UTF-8?q?Michal=20Such=C3=A1nek?= , Bin Meng Subject: [PATCH 1/9] hw/sd: When card is in wrong state, log which state it is Date: Wed, 23 Jun 2021 20:00:13 +0200 Message-Id: <20210623180021.898286-2-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210623180021.898286-1-f4bug@amsat.org> References: <20210623180021.898286-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) 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: Eric Blake --- 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