Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129830
b: refs/heads/master
c: e382968
h: refs/heads/master
v: v3
  • Loading branch information
Kashyap, Desai authored and James Bottomley committed Jan 13, 2009
1 parent a2ccc5c commit 49145a2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd7a253311412b3fc7c85586552c90eca61e7d23
refs/heads/master: e382968ba618e016ff7922dff9a6140c2f9108c8
50 changes: 37 additions & 13 deletions trunk/drivers/message/fusion/mptbase.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, 1);
MODULE_PARM_DESC(mpt_msi_enable_sas, " Enable MSI Support for SAS \
controllers (default=1)");


static int mpt_channel_mapping;
module_param(mpt_channel_mapping, int, 0);
Expand All @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 49145a2

Please sign in to comment.