Skip to content

Commit 0764040

Browse files
Ching Huangmartinkpetersen
authored andcommitted
scsi: arcmsr: Add driver module parameter msix_enable
Add module parameter msix_enable so user has the option of disabling MSI-X interrupts if there is a platform problem. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent a18686e commit 0764040

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/scsi/arcmsr/arcmsr_hba.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ MODULE_DESCRIPTION("Areca ARC11xx/12xx/16xx/188x SAS/SATA RAID Controller Driver
7575
MODULE_LICENSE("Dual BSD/GPL");
7676
MODULE_VERSION(ARCMSR_DRIVER_VERSION);
7777

78+
static int msix_enable = 1;
79+
module_param(msix_enable, int, S_IRUGO);
80+
MODULE_PARM_DESC(msix_enable, "Enable MSI-X interrupt(0 ~ 1), msix_enable=1(enable), =0(disable)");
81+
7882
static int msi_enable = 1;
7983
module_param(msi_enable, int, S_IRUGO);
8084
MODULE_PARM_DESC(msi_enable, "Enable MSI interrupt(0 ~ 1), msi_enable=1(enable), =0(disable)");
@@ -829,12 +833,15 @@ arcmsr_request_irq(struct pci_dev *pdev, struct AdapterControlBlock *acb)
829833
unsigned long flags;
830834
int nvec, i;
831835

836+
if (msix_enable == 0)
837+
goto msi_int0;
832838
nvec = pci_alloc_irq_vectors(pdev, 1, ARCMST_NUM_MSIX_VECTORS,
833839
PCI_IRQ_MSIX);
834840
if (nvec > 0) {
835841
pr_info("arcmsr%d: msi-x enabled\n", acb->host->host_no);
836842
flags = 0;
837843
} else {
844+
msi_int0:
838845
if (msi_enable == 1) {
839846
nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
840847
if (nvec == 1) {

0 commit comments

Comments
 (0)