From patchwork Tue Feb 13 04:07:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 872573 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="PNYGDj9q"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zgTjq5wLHz9sPk for ; Tue, 13 Feb 2018 15:15:59 +1100 (AEDT) Received: from localhost ([::1]:37400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elS0b-0006Vt-RP for incoming@patchwork.ozlabs.org; Mon, 12 Feb 2018 23:15:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elRtp-0000yh-ST for qemu-devel@nongnu.org; Mon, 12 Feb 2018 23:08:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elRtp-0007jl-34 for qemu-devel@nongnu.org; Mon, 12 Feb 2018 23:08:57 -0500 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:36504) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1elRto-0007jW-Ui for qemu-devel@nongnu.org; Mon, 12 Feb 2018 23:08:57 -0500 Received: by mail-qk0-x241.google.com with SMTP id 15so21063194qkl.3 for ; Mon, 12 Feb 2018 20:08:56 -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; bh=F3DsUrUkNz1+Uljbpcv+JWr3tF9Rh1qgAvwGmJqEQRU=; b=PNYGDj9qlQ/go2Khc7ShJFUaA/xZJTroXr0RymehnFpSnsyhCOoa5DyJ7SdRcrriFC p/zObi9h3piC6yS4VVn5fF6uu1uQisL6LF87wbeDYdPnX4Ep3NmRy0H72QuxOhrLuo8g q1xdaqSliALZVxm6KyLwU+NaZbQeG6aUkeWLoe/1qlzhf9Ac4j9f05F5JaGmjT13xRKr 7Dz/PK04pgYpYOWkdrG2BZL4NyVghrhwGa05il461pGBfx5TDss/rXbGqeD4nR7QfUlN lw6Cy/j1Mrj4n6IpIXhIAVmfhjJXCgRDk5n66zw0Y5HL7wlgkyIsd+Pmg+nnDZDacmNW beYg== 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; bh=F3DsUrUkNz1+Uljbpcv+JWr3tF9Rh1qgAvwGmJqEQRU=; b=ZsGX2xKAuX9AxlwOQIMGXmIvxhUPUcFP/br3RCeG0mj1pQPk+kS1r/XGtrDondrmJ/ NIMKIMJyCXUl14J9CKORfJIs/0DiooYVg3Hl2+eIhgoxaOTcJvMfCNzhnWqwSTY3rh0r /EKZXHeZI5/UIBcUXaN9tj7eRiI0ms6XrarZRHyotMyNnhZaH0f40SICGZEo33OC+5FT AyYqU5jX+D9Tqrau6lLfEfHEfuaPvstbet2ARibfUyfSb4/eRenMGmoY6m5tayxTqK78 HjrvX+NWj27VeTxhYff+dy8K+7ZW0eIgX32Yqld9FiXwP14+b+wlabCe2UUMO3S2bnqY 1qpA== X-Gm-Message-State: APf1xPCKyi5eK92811MAaIMsXwWcu9034APSp3hC6Fi/3LSj5JDgUMSq B70P/TBXwwrVLHix4ev63nE= X-Google-Smtp-Source: AH8x227M4uxiyUGuvzg3k+9mj8yo1zhRisUkuTiuNcrWApX1HOGuzdmiXtnowUIrHuuNoDffpREB9Q== X-Received: by 10.55.21.158 with SMTP id 30mr11370470qkv.1.1518494936605; Mon, 12 Feb 2018 20:08:56 -0800 (PST) Received: from x1.local ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id q2sm7350435qki.10.2018.02.12.20.08.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 20:08:56 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini Date: Tue, 13 Feb 2018 01:07:51 -0300 Message-Id: <20180213040809.26021-13-f4bug@amsat.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180213040809.26021-1-f4bug@amsat.org> References: <20180213040809.26021-1-f4bug@amsat.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PATCH v13 12/30] 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: "Edgar E . Iglesias" , Peter Maydell , Fam Zheng , qemu-devel@nongnu.org, Alistair Francis , Sai Pavan Boddu Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 --- 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 650265a472..4bd35078a9 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; }