qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/sd: print bad s->arglen in unexpected response
@ 2025-07-22  9:05 Ben Dooks
  2025-07-23 12:46 ` Alex Bennée
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Dooks @ 2025-07-22  9:05 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Ben Dooks

If we get "ssi_sd: error: Unexpected response to cmd" then having
the bad s->arglen would be useful debug and does not add any complexity
to the code.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 hw/sd/ssi-sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
index 6c90a86ab4..f1441d2c97 100644
--- a/hw/sd/ssi-sd.c
+++ b/hw/sd/ssi-sd.c
@@ -183,7 +183,7 @@ static uint32_t ssi_sd_transfer(SSIPeripheral *dev, uint32_t val)
                 s->response[0] = 1;
                 memcpy(&s->response[1], longresp, 4);
             } else if (s->arglen != 4) {
-                BADF("Unexpected response to cmd %d\n", s->cmd);
+                BADF("Unexpected response to cmd %d, arglen=%d\n", s->cmd, s->arglen);
                 /* Illegal command is about as near as we can get.  */
                 s->arglen = 1;
                 s->response[0] = 4;
-- 
2.37.2.352.g3c44437643



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-07-24 10:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22  9:05 [PATCH] hw/sd: print bad s->arglen in unexpected response Ben Dooks
2025-07-23 12:46 ` Alex Bennée
2025-07-23 13:38   ` Peter Maydell
2025-07-23 14:55     ` Ben Dooks
2025-07-23 16:30       ` Philippe Mathieu-Daudé
2025-07-24  9:45         ` Ben Dooks
2025-07-24 10:32         ` Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).