* [PATCH 2/5] mpt fusion: Added msi enable disable for FC,SPI and SAS
@ 2009-01-06 9:32 Kashyap, Desai
2009-01-06 18:00 ` Grant Grundler
0 siblings, 1 reply; 3+ messages in thread
From: Kashyap, Desai @ 2009-01-06 9:32 UTC (permalink / raw)
To: linux-scsi; +Cc: eric.moore, sathyap, James.Bottomley
Added support for MSI enable/disable for different buses FC,SPI,SAS instead
of having single MSI enable/disable feature.
---
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
---
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index c4e8b9a..55d9a7e 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -79,9 +79,22 @@ MODULE_VERSION(my_VERSION);
/*
* cmd line parameters
*/
-static int mpt_msi_enable = -1;
-module_param(mpt_msi_enable, int, 0);
-MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)");
+
+static int mpt_msi_enable_spi;
+module_param(mpt_msi_enable_spi, int, 0);
+MODULE_PARM_DESC(mpt_msi_enable_spi, " Enable MSI Support for SPI \
+ controllers (default=0)");
+
+static int mpt_msi_enable_fc;
+module_param(mpt_msi_enable_fc, int, 0);
+MODULE_PARM_DESC(mpt_msi_enable_fc, " Enable MSI Support for FC \
+ controllers (default=0)");
+
+static int mpt_msi_enable_sas;
+module_param(mpt_msi_enable_sas, int, 0);
+MODULE_PARM_DESC(mpt_msi_enable_sas, " Enable MSI Support for SAS \
+ controllers (default=0)");
+
static int mpt_channel_mapping;
module_param(mpt_channel_mapping, int, 0);
@@ -91,7 +104,9 @@ static int mpt_debug_level;
static int mpt_set_debug_level(const char *val, struct kernel_param *kp);
module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int,
&mpt_debug_level, 0600);
-MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h - (default=0)");
+MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h \
+ - (default=0)");
+
#ifdef MFCNT
static int mfcounter = 0;
@@ -1751,16 +1766,25 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
ioc->bus_type = SAS;
}
- if (mpt_msi_enable == -1) {
- /* Enable on SAS, disable on FC and SPI */
- if (ioc->bus_type == SAS)
- ioc->msi_enable = 1;
- else
- ioc->msi_enable = 0;
- } else
- /* follow flag: 0 - disable; 1 - enable */
- ioc->msi_enable = mpt_msi_enable;
+ switch (ioc->bus_type) {
+
+ case SAS:
+ ioc->msi_enable = mpt_msi_enable_sas;
+ break;
+
+ case SPI:
+ ioc->msi_enable = mpt_msi_enable_spi;
+ break;
+
+ case FC:
+ ioc->msi_enable = mpt_msi_enable_fc;
+ break;
+
+ default:
+ ioc->msi_enable = 0;
+ break;
+ }
if (ioc->errata_flag_1064)
pci_disable_io_access(pdev);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/5] mpt fusion: Added msi enable disable for FC,SPI and SAS
2009-01-06 9:32 [PATCH 2/5] mpt fusion: Added msi enable disable for FC,SPI and SAS Kashyap, Desai
@ 2009-01-06 18:00 ` Grant Grundler
2009-01-07 6:00 ` Desai, Kashyap
0 siblings, 1 reply; 3+ messages in thread
From: Grant Grundler @ 2009-01-06 18:00 UTC (permalink / raw)
To: Kashyap, Desai; +Cc: linux-scsi, eric.moore, sathyap, James.Bottomley
On Tue, Jan 6, 2009 at 1:32 AM, Kashyap, Desai <kashyap.desai@lsi.com> wrote:
>
> Added support for MSI enable/disable for different buses FC,SPI,SAS instead
> of having single MSI enable/disable feature.
> ---
>
> Signed-off-by: Kashyap Desai <kadesai@lsi.com>
> ---
> diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
> index c4e8b9a..55d9a7e 100644
> --- a/drivers/message/fusion/mptbase.c
> +++ b/drivers/message/fusion/mptbase.c
> @@ -79,9 +79,22 @@ MODULE_VERSION(my_VERSION);
> /*
> * cmd line parameters
> */
> -static int mpt_msi_enable = -1;
> -module_param(mpt_msi_enable, int, 0);
> -MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)");
> +
> +static int mpt_msi_enable_spi;
> +module_param(mpt_msi_enable_spi, int, 0);
> +MODULE_PARM_DESC(mpt_msi_enable_spi, " Enable MSI Support for SPI \
> + controllers (default=0)");
Hi,
This patch looks fine to me.
But, is there a reason the msi enable flags are 0 (disabled) by default?
I was expecting these to be enabled unless MPT firmware has
some known bugs. If the chipset is known buggy, a global flag will
disable MSI for all devices anyway.
thanks,
grant
> +
> +static int mpt_msi_enable_fc;
> +module_param(mpt_msi_enable_fc, int, 0);
> +MODULE_PARM_DESC(mpt_msi_enable_fc, " Enable MSI Support for FC \
> + controllers (default=0)");
> +
> +static int mpt_msi_enable_sas;
> +module_param(mpt_msi_enable_sas, int, 0);
> +MODULE_PARM_DESC(mpt_msi_enable_sas, " Enable MSI Support for SAS \
> + controllers (default=0)");
> +
>
> static int mpt_channel_mapping;
> module_param(mpt_channel_mapping, int, 0);
> @@ -91,7 +104,9 @@ static int mpt_debug_level;
> static int mpt_set_debug_level(const char *val, struct kernel_param *kp);
> module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int,
> &mpt_debug_level, 0600);
> -MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h - (default=0)");
> +MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h \
> + - (default=0)");
> +
>
> #ifdef MFCNT
> static int mfcounter = 0;
> @@ -1751,16 +1766,25 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
> ioc->bus_type = SAS;
> }
>
> - if (mpt_msi_enable == -1) {
> - /* Enable on SAS, disable on FC and SPI */
> - if (ioc->bus_type == SAS)
> - ioc->msi_enable = 1;
> - else
> - ioc->msi_enable = 0;
> - } else
> - /* follow flag: 0 - disable; 1 - enable */
> - ioc->msi_enable = mpt_msi_enable;
>
> + switch (ioc->bus_type) {
> +
> + case SAS:
> + ioc->msi_enable = mpt_msi_enable_sas;
> + break;
> +
> + case SPI:
> + ioc->msi_enable = mpt_msi_enable_spi;
> + break;
> +
> + case FC:
> + ioc->msi_enable = mpt_msi_enable_fc;
> + break;
> +
> + default:
> + ioc->msi_enable = 0;
> + break;
> + }
> if (ioc->errata_flag_1064)
> pci_disable_io_access(pdev);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH 2/5] mpt fusion: Added msi enable disable for FC,SPI and SAS
2009-01-06 18:00 ` Grant Grundler
@ 2009-01-07 6:00 ` Desai, Kashyap
0 siblings, 0 replies; 3+ messages in thread
From: Desai, Kashyap @ 2009-01-07 6:00 UTC (permalink / raw)
To: Grant Grundler
Cc: linux-scsi@vger.kernel.org, Moore, Eric, Prakash, Sathya,
James.Bottomley@hansenpartnership.com
Grant,
I will resubmit this patch as per your suggestion.
Default value will be 1 for mpt_msi_enable_sas and for others it will 0.
We have tested so far using the following values
mpt_msi_enable_sas = 1
mpt_msi_enable_fc = 0
mpt_msi_enable_spi = 0
I will resubmit updated patch with above default values.
Thanks
Kashyap Desai
-----Original Message-----
From: Grant Grundler [mailto:grundler@google.com]
Sent: Tuesday, January 06, 2009 11:30 PM
To: Desai, Kashyap
Cc: linux-scsi@vger.kernel.org; Moore, Eric; Prakash, Sathya; James.Bottomley@hansenpartnership.com
Subject: Re: [PATCH 2/5] mpt fusion: Added msi enable disable for FC,SPI and SAS
On Tue, Jan 6, 2009 at 1:32 AM, Kashyap, Desai <kashyap.desai@lsi.com> wrote:
>
> Added support for MSI enable/disable for different buses FC,SPI,SAS instead
> of having single MSI enable/disable feature.
> ---
>
> Signed-off-by: Kashyap Desai <kadesai@lsi.com>
> ---
> diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
> index c4e8b9a..55d9a7e 100644
> --- a/drivers/message/fusion/mptbase.c
> +++ b/drivers/message/fusion/mptbase.c
> @@ -79,9 +79,22 @@ MODULE_VERSION(my_VERSION);
> /*
> * cmd line parameters
> */
> -static int mpt_msi_enable = -1;
> -module_param(mpt_msi_enable, int, 0);
> -MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)");
> +
> +static int mpt_msi_enable_spi;
> +module_param(mpt_msi_enable_spi, int, 0);
> +MODULE_PARM_DESC(mpt_msi_enable_spi, " Enable MSI Support for SPI \
> + controllers (default=0)");
Hi,
This patch looks fine to me.
But, is there a reason the msi enable flags are 0 (disabled) by default?
I was expecting these to be enabled unless MPT firmware has
some known bugs. If the chipset is known buggy, a global flag will
disable MSI for all devices anyway.
thanks,
grant
> +
> +static int mpt_msi_enable_fc;
> +module_param(mpt_msi_enable_fc, int, 0);
> +MODULE_PARM_DESC(mpt_msi_enable_fc, " Enable MSI Support for FC \
> + controllers (default=0)");
> +
> +static int mpt_msi_enable_sas;
> +module_param(mpt_msi_enable_sas, int, 0);
> +MODULE_PARM_DESC(mpt_msi_enable_sas, " Enable MSI Support for SAS \
> + controllers (default=0)");
> +
>
> static int mpt_channel_mapping;
> module_param(mpt_channel_mapping, int, 0);
> @@ -91,7 +104,9 @@ static int mpt_debug_level;
> static int mpt_set_debug_level(const char *val, struct kernel_param *kp);
> module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int,
> &mpt_debug_level, 0600);
> -MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h - (default=0)");
> +MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h \
> + - (default=0)");
> +
>
> #ifdef MFCNT
> static int mfcounter = 0;
> @@ -1751,16 +1766,25 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
> ioc->bus_type = SAS;
> }
>
> - if (mpt_msi_enable == -1) {
> - /* Enable on SAS, disable on FC and SPI */
> - if (ioc->bus_type == SAS)
> - ioc->msi_enable = 1;
> - else
> - ioc->msi_enable = 0;
> - } else
> - /* follow flag: 0 - disable; 1 - enable */
> - ioc->msi_enable = mpt_msi_enable;
>
> + switch (ioc->bus_type) {
> +
> + case SAS:
> + ioc->msi_enable = mpt_msi_enable_sas;
> + break;
> +
> + case SPI:
> + ioc->msi_enable = mpt_msi_enable_spi;
> + break;
> +
> + case FC:
> + ioc->msi_enable = mpt_msi_enable_fc;
> + break;
> +
> + default:
> + ioc->msi_enable = 0;
> + break;
> + }
> if (ioc->errata_flag_1064)
> pci_disable_io_access(pdev);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-07 6:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-06 9:32 [PATCH 2/5] mpt fusion: Added msi enable disable for FC,SPI and SAS Kashyap, Desai
2009-01-06 18:00 ` Grant Grundler
2009-01-07 6:00 ` Desai, Kashyap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.