Received: from eggs.gnu.org ([140.186.70.92]:42969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcNUp-0005H7-Nn for qemu-devel@nongnu.org; Sun, 18 Dec 2011 15:38:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RcNUo-0006ym-Tj for qemu-devel@nongnu.org; Sun, 18 Dec 2011 15:38:11 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:38904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcNUo-0006yK-MG for qemu-devel@nongnu.org; Sun, 18 Dec 2011 15:38:10 -0500 From: Peter Maydell Date: Sun, 18 Dec 2011 20:38:00 +0000 Message-Id: <1324240680-26905-11-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1324240680-26905-1-git-send-email-peter.maydell@linaro.org> References: <1324240680-26905-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 10/10] hw/sd.c: Clear status bits when read via response r6 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org Response format r6 includes a subset of the status bits; clear the clear-on-read bits which are read by an r6 response. Signed-off-by: Peter Maydell --- hw/sd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/sd.c b/hw/sd.c index 6614cbf..2b8ebe4 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -371,6 +371,7 @@ static void sd_response_r6_make(SDState *sd, uint8_t *response) status = ((sd->card_status >> 8) & 0xc000) | ((sd->card_status >> 6) & 0x2000) | (sd->card_status & 0x1fff); + sd->card_status &= ~(CARD_STATUS_C & 0xc81fff); response[0] = (arg >> 8) & 0xff; response[1] = arg & 0xff; -- 1.7.5.4