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.do...@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


Reply via email to