aboutsummaryrefslogtreecommitdiff
path: root/hw/sd
diff options
context:
space:
mode:
authorSai Pavan Boddu <saipava@xilinx.com>2018-02-08 13:48:00 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-02-13 16:15:08 +0100
commit04654b5a8c8ed5c2fcd77da0c555c936141ee125 (patch)
treef44e847e32190ab180baef5fb2afac87ced43782 /hw/sd
parentbf8ec38e17d27e7ebbfd31a3725a77209abe943d (diff)
downloadqemu-04654b5a8c8ed5c2fcd77da0c555c936141ee125.zip
qemu-04654b5a8c8ed5c2fcd77da0c555c936141ee125.tar.gz
qemu-04654b5a8c8ed5c2fcd77da0c555c936141ee125.tar.bz2
sdhci: Fix 64-bit ADMA2
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 <saipava@xilinx.com> [AF: Re-write commit message] Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Message-Id: <20180208164818.7961-13-f4bug@amsat.org>
Diffstat (limited to 'hw/sd')
-rw-r--r--hw/sd/sdhci.c4
1 files 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;
}