SD card state change from ident to stby
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
My environment
host : Linux PC(2.6.29.4)
Target: ARM-CortexA8
I am not running any OS on the target.
Below is my command line:
../src/
Problem scenario
1. CMD13 issued immediately after identication phase reports SD card state as "ident" instead of "stby".
2. class 0(basic) commands are reported as "ILLEGAL_COMMAND" after the card is locked.
Observation
1. In function sd_do_command(), the status of *previous* command is reflected only after the call to sd_set_status(sd). The variable "last_status" should contain the updated value of sd->card_status in order to correctly indicate *last command's* card status.
2. A "not" condition is missing in the if statement in the function sd_do_command(), thereby falsely exiting the function for class0 commands issued after card is locked.
Below is the patch file that seems to be taking care of the above two problems.
*** sd-0.12.4.c 2010-06-23 13:56:05.000000000 +0530
--- sd-0.12.4.rudra.c 2010-06-23 14:08:10.000000000 +0530
***************
*** 1265,1278 ****
sd-
sd_
if (last_status & CARD_IS_LOCKED)
! if (((last_status & APP_CMD) &&
! req->cmd == 16 || req->cmd == 55))) {
--- 1265,1279 ----
sd-
sd_
+ last_status = sd->card_status;
if (last_status & CARD_IS_LOCKED)
! if (!(((last_status & APP_CMD) &&
! req->cmd == 16 || req->cmd == 55)))) {
Changed in qemu: | |
status: | Fix Committed → Fix Released |
These two issues should now be fixed in qemu git master by commits 25881d3..3799ce4.