From patchwork Tue Nov 3 09:06:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Nelson X-Patchwork-Id: 37495 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.176.167]) by ozlabs.org (Postfix) with ESMTP id 05CC1B7C14 for ; Tue, 3 Nov 2009 20:07:31 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756236AbZKCJGv (ORCPT ); Tue, 3 Nov 2009 04:06:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756223AbZKCJGu (ORCPT ); Tue, 3 Nov 2009 04:06:50 -0500 Received: from mail-ew0-f207.google.com ([209.85.219.207]:34567 "EHLO mail-ew0-f207.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756075AbZKCJGp (ORCPT ); Tue, 3 Nov 2009 04:06:45 -0500 Received: by ewy3 with SMTP id 3so1744677ewy.37 for ; Tue, 03 Nov 2009 01:06:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=ZDpKM78HVA9lvREL/mBjmV4ofYSroWzOTs9DJPNwj34=; b=WBTZFEG86DmJmRJAlm4QJZ3xhzVlttJxfu6vxDIf5JS37Raoo9gT8KejRiocD9br1i sGE4lCUigRXH8s8QTyyrYgbQDqzEUWSAxoScuE1EaFIBpL2kLxWHcwQtTiEMgDdrzpvI aJFD538lPbA2KCYnGmvRKywsIyIkyR3Q6TVjs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=SDC6p81gnUXwJqXWW/iBe5yBEyIJOlvZiMgAd3pRPTcjIkBmuhUtbdbqXfwpWyYs0d TARDa7yg1YZc6mh648v2DBF2tRXYi6b2mEuvpaOq9ffKGU+LxfEPQ7b1vNZuvqTt+TI4 qAztJDpKqYeVJcGHivi/wNzQ7mmd9NnkJsJuU= MIME-Version: 1.0 Received: by 10.216.90.138 with SMTP id e10mr6295345wef.150.1257239208810; Tue, 03 Nov 2009 01:06:48 -0800 (PST) Date: Tue, 3 Nov 2009 20:06:48 +1100 Message-ID: <65a6ef750911030106o2d6a6391o60fac0f2b75cbcc4@mail.gmail.com> Subject: [PATCH] ahci: Enable SB600 64bit DMA on MSI K9A2 Platinum v2 From: Mark Nelson To: Tejun Heo Cc: linux-ide@vger.kernel.org, jeff@garzik.org Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Like the Asus M2A-VM, MSI's K9A2 Platinum (MS-7376) can also support 64bit DMA. It is a new enough board that all the BIOS releases work correctly with 64bit DMA enabled. Signed-off-by: Mark Nelson Acked-by: Tejun Heo --- drivers/ata/ahci.c | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) -- 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/ahci.c =================================================================== --- linux-2.6.orig/drivers/ata/ahci.c +++ linux-2.6/drivers/ata/ahci.c @@ -2726,6 +2726,30 @@ static bool ahci_sb600_enable_64bit(stru }, .driver_data = "20071026", /* yyyymmdd */ }, + /* + * All BIOS versions for the MSI K9A2 Platinum (MS-7376) + * support 64bit DMA. + * + * BIOS versions earlier than 1.5 had the Manufacturer DMI + * fields as "MICRO-STAR INTERANTIONAL CO.,LTD". + * This spelling mistake was fixed in BIOS version 1.5, so + * 1.5 and later have the Manufacturer as + * "MICRO-STAR INTERNATIONAL CO.,LTD". + * So try to match on DMI_BOARD_VENDOR of "MICRO-STAR INTER". + * + * BIOS versions earlier than 1.9 had a Board Product Name + * DMI field of "MS-7376". This was changed to be + * "K9A2 Platinum (MS-7376)" in version 1.9, but we can still + * match on DMI_BOARD_NAME of "MS-7376". + */ + { + .ident = "MSI K9A2 Platinum", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, + "MICRO-STAR INTER"), + DMI_MATCH(DMI_BOARD_NAME, "MS-7376"), + }, + }, { } }; const struct dmi_system_id *match; @@ -2737,18 +2761,24 @@ static bool ahci_sb600_enable_64bit(stru !match) return false; + if (!match->driver_data) + goto enable_64bit; + dmi_get_date(DMI_BIOS_DATE, &year, &month, &date); snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date); - if (strcmp(buf, match->driver_data) >= 0) { - dev_printk(KERN_WARNING, &pdev->dev, "%s: enabling 64bit DMA\n", - match->ident); - return true; - } else { + if (strcmp(buf, match->driver_data) >= 0) + goto enable_64bit; + else { dev_printk(KERN_WARNING, &pdev->dev, "%s: BIOS too old, " "forcing 32bit DMA, update BIOS\n", match->ident); return false; } + +enable_64bit: + dev_printk(KERN_WARNING, &pdev->dev, "%s: enabling 64bit DMA\n", + match->ident); + return true; } static bool ahci_broken_system_poweroff(struct pci_dev *pdev)