* [PATCH 15/17] scsi: arcmsr: Add driver module parameter msi_enable
@ 2017-12-05 2:24 Ching Huang
0 siblings, 0 replies; only message in thread
From: Ching Huang @ 2017-12-05 2:24 UTC (permalink / raw)
To: martin.petersen, linux-scsi, linux-kernel; +Cc: James.Bottomley, sfr
From: Ching Huang <ching2048@areca.com.tw>
Add module parameter msi_enable to has a chance to disable msi interrupt if between controller and system has
msi INT compatible issue.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
---
diff -uprN a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
--- a/drivers/scsi/arcmsr/arcmsr_hba.c 2017-12-05 11:44:36.000000000 +0800
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2017-12-05 16:59:58.000000000 +0800
@@ -75,6 +75,10 @@ MODULE_DESCRIPTION("Areca ARC11xx/12xx/1
MODULE_LICENSE("Dual BSD/GPL");
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;
module_param(host_can_queue, int, S_IRUGO);
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,
pr_info("arcmsr%d: msi-x enabled\n", acb->host->host_no);
flags = 0;
} else {
- nvec = pci_alloc_irq_vectors(pdev, 1, 1,
- PCI_IRQ_MSI | PCI_IRQ_LEGACY);
+ if (msi_enable == 1) {
+ 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)
return FAILED;
-
+msi_int1:
flags = IRQF_SHARED;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-05 10:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-05 2:24 [PATCH 15/17] scsi: arcmsr: Add driver module parameter msi_enable Ching Huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox