aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-01-08 03:57:16 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-01-13 11:36:01 -0500
commite382968ba618e016ff7922dff9a6140c2f9108c8 (patch)
treec51558e97a1de9523a20ab659758ddd0abe54bf1 /drivers/message
parentfd7a253311412b3fc7c85586552c90eca61e7d23 (diff)
[SCSI] mpt fusion: Add separate msi enable disable for FC,SPI,SAS
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> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptbase.c50
1 files changed, 37 insertions, 13 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index c4e8b9aa3827..787a12648dbc 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -79,9 +79,22 @@ MODULE_VERSION(my_VERSION);
79/* 79/*
80 * cmd line parameters 80 * cmd line parameters
81 */ 81 */
82static int mpt_msi_enable = -1; 82
83module_param(mpt_msi_enable, int, 0); 83static int mpt_msi_enable_spi;
84MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)"); 84module_param(mpt_msi_enable_spi, int, 0);
85MODULE_PARM_DESC(mpt_msi_enable_spi, " Enable MSI Support for SPI \
86 controllers (default=0)");
87
88static int mpt_msi_enable_fc;
89module_param(mpt_msi_enable_fc, int, 0);
90MODULE_PARM_DESC(mpt_msi_enable_fc, " Enable MSI Support for FC \
91 controllers (default=0)");
92
93static int mpt_msi_enable_sas;
94module_param(mpt_msi_enable_sas, int, 1);
95MODULE_PARM_DESC(mpt_msi_enable_sas, " Enable MSI Support for SAS \
96 controllers (default=1)");
97
85 98
86static int mpt_channel_mapping; 99static int mpt_channel_mapping;
87module_param(mpt_channel_mapping, int, 0); 100module_param(mpt_channel_mapping, int, 0);
@@ -91,7 +104,9 @@ static int mpt_debug_level;
91static int mpt_set_debug_level(const char *val, struct kernel_param *kp); 104static int mpt_set_debug_level(const char *val, struct kernel_param *kp);
92module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int, 105module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int,
93 &mpt_debug_level, 0600); 106 &mpt_debug_level, 0600);
94MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h - (default=0)"); 107MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h \
108 - (default=0)");
109
95 110
96#ifdef MFCNT 111#ifdef MFCNT
97static int mfcounter = 0; 112static int mfcounter = 0;
@@ -1751,16 +1766,25 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1751 ioc->bus_type = SAS; 1766 ioc->bus_type = SAS;
1752 } 1767 }
1753 1768
1754 if (mpt_msi_enable == -1) {
1755 /* Enable on SAS, disable on FC and SPI */
1756 if (ioc->bus_type == SAS)
1757 ioc->msi_enable = 1;
1758 else
1759 ioc->msi_enable = 0;
1760 } else
1761 /* follow flag: 0 - disable; 1 - enable */
1762 ioc->msi_enable = mpt_msi_enable;
1763 1769
1770 switch (ioc->bus_type) {
1771
1772 case SAS:
1773 ioc->msi_enable = mpt_msi_enable_sas;
1774 break;
1775
1776 case SPI:
1777 ioc->msi_enable = mpt_msi_enable_spi;
1778 break;
1779
1780 case FC:
1781 ioc->msi_enable = mpt_msi_enable_fc;
1782 break;
1783
1784 default:
1785 ioc->msi_enable = 0;
1786 break;
1787 }
1764 if (ioc->errata_flag_1064) 1788 if (ioc->errata_flag_1064)
1765 pci_disable_io_access(pdev); 1789 pci_disable_io_access(pdev);
1766 1790