From patchwork Tue Jun 26 02:45:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Nelson X-Patchwork-Id: 167292 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E7093B700E for ; Tue, 26 Jun 2012 12:45:53 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755659Ab2FZCpw (ORCPT ); Mon, 25 Jun 2012 22:45:52 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:60960 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755420Ab2FZCpw (ORCPT ); Mon, 25 Jun 2012 22:45:52 -0400 Received: by dady13 with SMTP id y13so6157514dad.19 for ; Mon, 25 Jun 2012 19:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=cryftbrGlBMA1GJy4BVg2CsYIzzRJpkhXaCaDXqTLGM=; b=MNrl3igvgAWAAoKKO21NtiOFxbE9aRVOxhyqLz4Y2JwOoNRaxBeKvQtB/Wfp3kAZiV mIQMPl+KmjSFHCYl80Mrb0OkS/iZtRNvRdqd19OQYiVoNQW2Nt+if0rey2GK6xhwQv5C bipIgpwya4UeVeAdVzdJaFqmBXyE1uyKzIinP5GfdPDXGGYe1SRz4dBlMWYf2BDbM9vq SdCZAT4YrgXPHYKx9flUgnYxzitRX0WdJ5liiXMJnLbcoPwDcS3tudHfl3O5DosmIVlc Kc/U98/Nycdz0SkYqoAfCMi+tsRv8ViSLFDAlfs5QeSC6SkN84VmY421SGG2Lvk5OIrP tRFQ== Received: by 10.68.221.106 with SMTP id qd10mr4277280pbc.42.1340678751788; Mon, 25 Jun 2012 19:45:51 -0700 (PDT) Received: from octopus.ibm.com ([128.250.103.231]) by mx.google.com with ESMTPS id qp9sm10356544pbc.9.2012.06.25.19.45.43 (version=SSLv3 cipher=OTHER); Mon, 25 Jun 2012 19:45:44 -0700 (PDT) Message-ID: <4FE92252.3010209@gmail.com> Date: Tue, 26 Jun 2012 12:45:38 +1000 From: Mark Nelson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120601 Thunderbird/10.0.5 MIME-Version: 1.0 To: Jeff Garzik CC: linux-ide@vger.kernel.org, tj@kernel.org Subject: [PATCH 0/1] ahci: Enable SB600 64bit DMA on MSI K9AGM2 (MS-7327) Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org I've come across another motherboard that uses an SB600 southbridge so I figured I'd run some tests to see if it worked correctly with 64bit DMA enabled in the AHCI driver. And it does indeed work properly, so this patch enables 64bit DMA on the MSI K9AGM2 (MS-7327). Similar to my earlier patches that enabled 64bit DMA on the MSI K9A2 Platinum (e65cc194f7628ecaa02462f22f42fb09b50dcd49) and the Asus M3A (3c4aa91f21f65b7b40bdfb015eacbcb8453ccae2) this patch matches on a Board Product Name DMI field of "MS-7327" which stays constant across all BIOS versions. Testing was done in exactly the same way as it was for the other patches (http://patchwork.ozlabs.org/patch/36881) - with 4GB RAM installed in the machine (which had ~1GB remapped above the 4GB boundary) a large (~8GB) file was copied and the checksums of the copy and original were compared. To make sure that we were actually DMAing to a high enough address for the copy the following simple patch was used: --- drivers/ata/libahci.c | 5 +++++ 1 file changed, 5 insertions(+) For the testing I had an old enough CPU that I could flash to and test all the BIOS releases going all the way back to 1.0. I ended up testing 7 BIOS releases from 1.0 to 1.6 (all those that MSI publicly released) to make sure that there weren't any regressions lurking in there. And all worked flawlessly. Thus this patch :) Thanks! Mark -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/ata/libahci.c =================================================================== --- linux-2.6.orig/drivers/ata/libahci.c +++ linux-2.6/drivers/ata/libahci.c @@ -1395,6 +1395,11 @@ static unsigned int ahci_fill_sg(struct for_each_sg(qc->sg, sg, qc->n_elem, si) { dma_addr_t addr = sg_dma_address(sg); u32 sg_len = sg_dma_len(sg); + static int cnt; + + if (addr > 0xffffffffULL && !(cnt++ % 500)) + printk("ahci: dma'ing to address 0x%llx\n", + (unsigned long long)addr); ahci_sg[si].addr = cpu_to_le32(addr & 0xffffffff); ahci_sg[si].addr_hi = cpu_to_le32((addr >> 16) >> 16);