hw/sd.c: When setting ADDRESS_ERROR bit, don't clear everything else

Fix a typo that meant that ADDRESS_ERRORs setting or clearing write
protection would clear every other bit in the status register.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
This commit is contained in:
Peter Maydell 2011-12-18 21:37:54 +01:00 committed by Andrzej Zaborowski
parent abda1f37ee
commit e30d59388b

View File

@ -999,7 +999,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
switch (sd->state) {
case sd_transfer_state:
if (addr >= sd->size) {
sd->card_status = ADDRESS_ERROR;
sd->card_status |= ADDRESS_ERROR;
return sd_r1b;
}
@ -1019,7 +1019,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
switch (sd->state) {
case sd_transfer_state:
if (addr >= sd->size) {
sd->card_status = ADDRESS_ERROR;
sd->card_status |= ADDRESS_ERROR;
return sd_r1b;
}