diff --git a/hw/sd.c b/hw/sd.c index 799c9453352e3e6dac9d3d6ebfdf7c256a4aafdd..7974564ecb73fd194a511b5104cf5f2b6ff07a3d 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -1151,9 +1151,10 @@ int sd_do_command(SDState *sd, struct sd_request_s *req, return 0; } - if (last_status & APP_CMD) + if (last_status & APP_CMD) { rtype = sd_app_command(sd, *req); - else + sd->card_status &= ~APP_CMD; + } else rtype = sd_normal_command(sd, *req); sd->current_cmd = req->cmd; diff --git a/hw/sd.h b/hw/sd.h index cc05dbf179cb762e835b92295b63a3cd1650686b..2851e729fb3c2206a6c85d353cde24cc4f26feff 100644 --- a/hw/sd.h +++ b/hw/sd.h @@ -56,8 +56,8 @@ typedef enum { sd_none = -1, sd_bc = 0, /* broadcast -- no response */ - sd_bcr, /* broadcast with response */ - sd_ac, /* addressed -- no data transfer */ + sd_bcr, /* broadcast with response */ + sd_ac, /* addressed -- no data transfer */ sd_adtc, /* addressed with data transfer */ } sd_cmd_type_t;