From nobody Tue Feb 10 04:17:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1514570757206557.706355759991; Fri, 29 Dec 2017 10:05:57 -0800 (PST) Received: from localhost ([::1]:48922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUz2W-0006iU-3L for importer@patchew.org; Fri, 29 Dec 2017 13:05:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUyoC-0003no-T1 for qemu-devel@nongnu.org; Fri, 29 Dec 2017 12:51:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUyoC-0007Ju-8b for qemu-devel@nongnu.org; Fri, 29 Dec 2017 12:51:04 -0500 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:37614) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eUyoC-0007J3-3i for qemu-devel@nongnu.org; Fri, 29 Dec 2017 12:51:04 -0500 Received: by mail-qt0-x243.google.com with SMTP id f2so54951145qtj.4 for ; Fri, 29 Dec 2017 09:51:03 -0800 (PST) Received: from x1.local ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id t41sm24223893qtt.84.2017.12.29.09.51.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Dec 2017 09:51:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GhYohe35FUKStwMf/CMpsiu83oCFkzHzOlYa8uTgYFU=; b=V8aJTcZetaDV0XemV6VVrNoFgNirMQGV91+6akQ6/ZO0Q43s9aCVMzOpxmbXi7fdAm peJxz1tmEs5ohKuYH5qE7Tj8k5+f4Pue8c4ioXPcTEbyHShfYeCs+i8Kypdt3WHjh53X 7ack9dzs36XsU4j8hHr2TbhsDT0sAt+k1GzGSdQ1x6ujLCsUVAxrRwPW8oCJmkYFPjkz DlZHhogS+URSSMxnfqNV8GzylPH+PnnAoVs89zHvSoe3iPkxdMbpPR1/21/vbSjSBBOF Ok4MuBYFQ6XWWVzwG3Pu2FLYrS06jhmYSKvoTDtqbez4iVkW+hP9ex0XVsHVNl0R6NRy kuAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=GhYohe35FUKStwMf/CMpsiu83oCFkzHzOlYa8uTgYFU=; b=JrlhsW4auLCT4mVf+L41l5zeldEtuRbab+F/NdZLPbDbRbrULuuNz/q3kRs9AdPo+5 KvISfCO4BFrutkqi2GYU3EsPK/G5T1/bljekD49Vnn4PB31Ogx7WSrpj7EpY/XIuhA7d Jfj9ZdjgMK40/zvnT3tSgVFhQB24BYw96ftSbhWkGzkkLzO4d11oetwdXhhTbS27hv08 GMhHByQEDlLOosIzSSGAgRWBI5Te3N95tZxvzELCKYid1WpMxeYbiM7oCca0/V9kAQG+ hIjKWHm0MDw2YK/UIQ/Z7TCW8VPpCtPVvqWptCQO3mrceHFiov0q9plhId//ra0pnvKH 89gA== X-Gm-Message-State: AKGB3mKtBD2JuJkpFQ80t1cIuU2xefet7RotYVY0DstMISV1Edhf2oVo HXjSHk4pChFNlY1+dfa9LJI= X-Google-Smtp-Source: ACJfBotQaOgQxQe+GtULk0kXkFcu+2JWG7v6gpNyj9gxgSueih6QSN9HVDlD5hc4ypL9k4blxmpdkA== X-Received: by 10.200.36.22 with SMTP id c22mr48409276qtc.207.1514569863633; Fri, 29 Dec 2017 09:51:03 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Alistair Francis , "Edgar E . Iglesias" , Peter Maydell , Andrey Smirnov , =?UTF-8?q?Gr=C3=A9gory=20Estrade?= , Prasad J Pandit Date: Fri, 29 Dec 2017 14:49:17 -0300 Message-Id: <20171229174933.1781-27-f4bug@amsat.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171229174933.1781-1-f4bug@amsat.org> References: <20171229174933.1781-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PATCH v3 26/42] sdhci: Fix 64-bit ADMA2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sai Pavan Boddu , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Peter Crosthwaite Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 df21663c6d..6164701ada 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -623,8 +623,8 @@ static void get_adma_description(SDHCIState *s, ADMADes= cr *dscr) dscr->length =3D le16_to_cpu(dscr->length); dma_memory_read(&s->dma_as, entry_addr + 4, (uint8_t *)(&dscr->addr), 8); - dscr->attr =3D le64_to_cpu(dscr->attr); - dscr->attr &=3D 0xfffffff8; + dscr->addr =3D le64_to_cpu(dscr->addr); + dscr->attr &=3D (uint8_t) ~0xC0; dscr->incr =3D 12; break; } --=20 2.15.1