* [PATCH 2.6.32 v3] Conditional MSI support for sata_nv
@ 2009-08-05 23:50 Tony Vroon
2009-08-12 10:26 ` Jeff Garzik
2009-08-12 17:03 ` Leon Woestenberg
0 siblings, 2 replies; 4+ messages in thread
From: Tony Vroon @ 2009-08-05 23:50 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, LKML, Philip Langdale, Robert Hancock
At least the nVidia MCP55 controller quite happily supports MSI.
This adds an option to use it. It is disabled by default.
As per feedback by Robert Hancock, it will honour the user
request as the kernel will not enable MSI where the controller
or the specific system configuration do not support it.
Signed-off-by: Tony Vroon <tony@linx.net>
Cc: Robert Hancock <hancockrwd@gmail.com>
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index b2d11f3..4598f19 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,12 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
} else if (type == SWNCQ)
nv_swncq_host_init(host);
+ if (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 +2565,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)");
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.32 v3] Conditional MSI support for sata_nv
2009-08-05 23:50 [PATCH 2.6.32 v3] Conditional MSI support for sata_nv Tony Vroon
@ 2009-08-12 10:26 ` Jeff Garzik
2009-08-12 17:03 ` Leon Woestenberg
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2009-08-12 10:26 UTC (permalink / raw)
To: Tony Vroon; +Cc: linux-ide, LKML, Philip Langdale, Robert Hancock
Tony Vroon wrote:
> At least the nVidia MCP55 controller quite happily supports MSI.
> This adds an option to use it. It is disabled by default.
> As per feedback by Robert Hancock, it will honour the user
> request as the kernel will not enable MSI where the controller
> or the specific system configuration do not support it.
>
> Signed-off-by: Tony Vroon <tony@linx.net>
> Cc: Robert Hancock <hancockrwd@gmail.com>
>
> diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
> index b2d11f3..4598f19 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,12 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
> } else if (type == SWNCQ)
> nv_swncq_host_init(host);
>
> + if (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 +2565,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)");
applied
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.32 v3] Conditional MSI support for sata_nv
2009-08-05 23:50 [PATCH 2.6.32 v3] Conditional MSI support for sata_nv Tony Vroon
2009-08-12 10:26 ` Jeff Garzik
@ 2009-08-12 17:03 ` Leon Woestenberg
2009-08-12 17:15 ` Tony Vroon
1 sibling, 1 reply; 4+ messages in thread
From: Leon Woestenberg @ 2009-08-12 17:03 UTC (permalink / raw)
To: Tony Vroon; +Cc: Jeff Garzik, linux-ide, LKML, Philip Langdale, Robert Hancock
Hello,
On Thu, Aug 6, 2009 at 1:50 AM, Tony Vroon<tony@linx.net> wrote:
> At least the nVidia MCP55 controller quite happily supports MSI.
> +static int msi_enabled;
> + if (msi_enabled) {
> + dev_printk(KERN_NOTICE, &pdev->dev, "Using MSI\n");
> + pci_enable_msi(pdev);
> + }
> +
I just saw this patch, didn't check the full sources.
Shouldn't there be a matching "if (msi_enabled)
pci_disabling_msi(pdev);" somewhere else?
Regards,
Leon.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.32 v3] Conditional MSI support for sata_nv
2009-08-12 17:03 ` Leon Woestenberg
@ 2009-08-12 17:15 ` Tony Vroon
0 siblings, 0 replies; 4+ messages in thread
From: Tony Vroon @ 2009-08-12 17:15 UTC (permalink / raw)
To: Leon Woestenberg
Cc: Jeff Garzik, linux-ide, LKML, Philip Langdale, Robert Hancock
[-- Attachment #1: Type: text/plain, Size: 356 bytes --]
On Wed, 2009-08-12 at 19:03 +0200, Leon Woestenberg wrote:
> Shouldn't there be a matching "if (msi_enabled)
> pci_disabling_msi(pdev);" somewhere else?
Hello there Leon,
Actually that is taken care of through other means. Please see Tejun
Heo's confirmation of this in the "v2" thread for this patch.
> Regards,
> Leon.
Regards,
Tony V.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-12 17:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-05 23:50 [PATCH 2.6.32 v3] Conditional MSI support for sata_nv Tony Vroon
2009-08-12 10:26 ` Jeff Garzik
2009-08-12 17:03 ` Leon Woestenberg
2009-08-12 17:15 ` Tony Vroon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).