From patchwork Wed Aug 5 19:20:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Vroon X-Patchwork-Id: 30806 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 bilbo.ozlabs.org (Postfix) with ESMTP id D7E7EB6F2B for ; Thu, 6 Aug 2009 05:21:08 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751246AbZHETU5 (ORCPT ); Wed, 5 Aug 2009 15:20:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751247AbZHETU5 (ORCPT ); Wed, 5 Aug 2009 15:20:57 -0400 Received: from gold.linx.net ([195.66.232.40]:34131 "EHLO gold.linx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751246AbZHETU5 (ORCPT ); Wed, 5 Aug 2009 15:20:57 -0400 Received: from localhost (localhost [127.0.0.1]) by gold.linx.net (Postfix) with ESMTP id E47EE1007E; Wed, 5 Aug 2009 20:20:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linx.net; h=date :message-id:subject:from:received:x-virus-scanned; s=dkim; t= 1249500055; bh=mwPGKLWejewl0ig+Rss0IB0Hl3S8WJrPUEjshHrIoiQ=; b=X laMFyVlLAfFd0t/DRK7h0QOHKMwfDiX9HhipCH6nrksaIEiL8toTypDKSAUj9C/0 eHRkKYXCMmFBZT3PFDKILpwll8BldXdyqP4Pts4yFuddgto0AqLdBTyq8ha56lgd SqvkNwXUWUnMR9AKSZfafLvyQY3daBlJkgLWSYi5gk= X-Virus-Scanned: amavisd-new at linx.net Received: by gold.linx.net (Postfix, from userid 0) id 8F2DE1007C; Wed, 5 Aug 2009 20:20:55 +0100 (BST) From: Tony Vroon To: Jeff Garzik Cc: linux-ide@vger.kernel.org, LKML , Philip Langdale Subject: [PATCH 2.6.32 v2] MCP55 SATA2 conditional MSI support for sata_nv Message-Id: <20090805192055.8F2DE1007C@gold.linx.net> Date: Wed, 5 Aug 2009 20:20:55 +0100 (BST) Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org The nVidia MCP55 SATA2 controller quite happily supports MSI. This adds an option to use it. It is disabled by default and will only be honoured on the specific controller I tested. This was suggested in 2007 back when the driver was less mature, perhaps now is a better time for it. Signed-off-by: Tony Vroon --- 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 diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index b2d11f3..5ec29c4 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -602,6 +602,7 @@ MODULE_VERSION(DRV_VERSION); static int adma_enabled; static int swncq_enabled = 1; +static int msi_enabled; static void nv_adma_register_mode(struct ata_port *ap) { @@ -2459,6 +2460,13 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) } else if (type == SWNCQ) nv_swncq_host_init(host); + /* enable MSI if requested */ + if (pdev->device == PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 && + msi_enabled) { + dev_printk(KERN_NOTICE, &pdev->dev, "Using MSI\n"); + pci_enable_msi(pdev); + } + pci_set_master(pdev); return ata_host_activate(host, pdev->irq, ipriv->irq_handler, IRQF_SHARED, ipriv->sht); @@ -2558,4 +2566,6 @@ module_param_named(adma, adma_enabled, bool, 0444); MODULE_PARM_DESC(adma, "Enable use of ADMA (Default: false)"); module_param_named(swncq, swncq_enabled, bool, 0444); MODULE_PARM_DESC(swncq, "Enable use of SWNCQ (Default: true)"); +module_param_named(msi, msi_enabled, bool, 0444); +MODULE_PARM_DESC(msi, "Enable use of MSI (Default: false)");