Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a18686eb authored by Ching Huang's avatar Ching Huang Committed by Martin K. Petersen
Browse files

scsi: arcmsr: Add driver module parameter msi_enable



Add module parameter msi_enable so user has the option of disabling MSI
interrupts if there is a platform problem.

Signed-off-by: default avatarChing Huang <ching2048@areca.com.tw>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 852c3f32
Loading
Loading
Loading
Loading
+13 −3
Original line number Original line Diff line number Diff line
@@ -75,6 +75,10 @@ MODULE_DESCRIPTION("Areca ARC11xx/12xx/16xx/188x SAS/SATA RAID Controller Driver
MODULE_LICENSE("Dual BSD/GPL");
MODULE_LICENSE("Dual BSD/GPL");
MODULE_VERSION(ARCMSR_DRIVER_VERSION);
MODULE_VERSION(ARCMSR_DRIVER_VERSION);


static int msi_enable = 1;
module_param(msi_enable, int, S_IRUGO);
MODULE_PARM_DESC(msi_enable, "Enable MSI interrupt(0 ~ 1), msi_enable=1(enable), =0(disable)");

static int host_can_queue = ARCMSR_DEFAULT_OUTSTANDING_CMD;
static int host_can_queue = ARCMSR_DEFAULT_OUTSTANDING_CMD;
module_param(host_can_queue, int, S_IRUGO);
module_param(host_can_queue, int, S_IRUGO);
MODULE_PARM_DESC(host_can_queue, " adapter queue depth(32 ~ 1024), default is 128");
MODULE_PARM_DESC(host_can_queue, " adapter queue depth(32 ~ 1024), default is 128");
@@ -831,11 +835,17 @@ arcmsr_request_irq(struct pci_dev *pdev, struct AdapterControlBlock *acb)
		pr_info("arcmsr%d: msi-x enabled\n", acb->host->host_no);
		pr_info("arcmsr%d: msi-x enabled\n", acb->host->host_no);
		flags = 0;
		flags = 0;
	} else {
	} else {
		nvec = pci_alloc_irq_vectors(pdev, 1, 1,
		if (msi_enable == 1) {
				PCI_IRQ_MSI | PCI_IRQ_LEGACY);
			nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
			if (nvec == 1) {
				dev_info(&pdev->dev, "msi enabled\n");
				goto msi_int1;
			}
		}
		nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY);
		if (nvec < 1)
		if (nvec < 1)
			return FAILED;
			return FAILED;

msi_int1:
		flags = IRQF_SHARED;
		flags = IRQF_SHARED;
	}
	}