From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elZHe-0004Mu-8J for qemu-devel@nongnu.org; Tue, 13 Feb 2018 07:02:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elZHd-0007ju-GM for qemu-devel@nongnu.org; Tue, 13 Feb 2018 07:02:02 -0500 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:54775) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1elZHd-0007jd-8q for qemu-devel@nongnu.org; Tue, 13 Feb 2018 07:02:01 -0500 Received: by mail-wm0-x244.google.com with SMTP id i186so15519938wmi.4 for ; Tue, 13 Feb 2018 04:02:01 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 13 Feb 2018 13:00:29 +0100 Message-Id: <1518523252-49106-26-git-send-email-pbonzini@redhat.com> In-Reply-To: <1518523252-49106-1-git-send-email-pbonzini@redhat.com> References: <1518523252-49106-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 25/48] sdhci: Fix 64-bit ADMA2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Sai Pavan Boddu From: Sai Pavan Boddu The 64-bit ADMA address is not converted to the cpu endianes correctly. This patch fixes the issue and uses a valid mask for the attribute data. Signed-off-by: Sai Pavan Boddu [AF: Re-write commit message] Reviewed-by: Alistair Francis Message-Id: <20180208164818.7961-13-f4bug@amsat.org> --- hw/sd/sdhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 1b3791c..a6322f2 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -667,8 +667,8 @@ static void get_adma_description(SDHCIState *s, ADMADescr *dscr) dscr->length = le16_to_cpu(dscr->length); dma_memory_read(s->dma_as, entry_addr + 4, (uint8_t *)(&dscr->addr), 8); - dscr->attr = le64_to_cpu(dscr->attr); - dscr->attr &= 0xfffffff8; + dscr->addr = le64_to_cpu(dscr->addr); + dscr->attr &= (uint8_t) ~0xC0; dscr->incr = 12; break; } -- 1.8.3.1