From: Ching Huang <ching2048@areca.com.tw>
To: martin.petersen@oracle.com,
James.Bottomley@HansenPartnership.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
jthumshirn@suse.de, hare@suse.de, dan.carpenter@oracle.com,
hch@infradead.org
Subject: [PATCH 2/3] scsi: arcmsr: Add driver module parameter msix_enable
Date: Thu, 23 Nov 2017 09:31:14 +0800 [thread overview]
Message-ID: <1511400674.9832.23.camel@Centos6.3-64> (raw)
From: Ching Huang <ching2048@areca.com.tw>
Add module parameter msix_enable to has a chance to disable msix interrupt if it does not work properly.
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-11-23 16:02:28.000000000 +0800
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2017-11-23 16:09:24.000000000 +0800
@@ -75,6 +75,10 @@ MODULE_DESCRIPTION("Areca ARC11xx/12xx/1
MODULE_LICENSE("Dual BSD/GPL");
MODULE_VERSION(ARCMSR_DRIVER_VERSION);
+static int msix_enable = 1;
+module_param(msix_enable, int, S_IRUGO);
+MODULE_PARM_DESC(msix_enable, " Enable MSI-X interrupt(0 ~ 1), msix_enable=1(enable), =0(disable)");
+
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)");
@@ -829,12 +833,15 @@ arcmsr_request_irq(struct pci_dev *pdev,
unsigned long flags;
int nvec, i;
+ if (msix_enable == 0)
+ goto msi_int0;
nvec = pci_alloc_irq_vectors(pdev, 1, ARCMST_NUM_MSIX_VECTORS,
PCI_IRQ_MSIX);
if (nvec > 0) {
pr_info("arcmsr%d: msi-x enabled\n", acb->host->host_no);
flags = 0;
} else {
+msi_int0:
if (msi_enable == 1)
nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
else
next reply other threads:[~2017-11-23 9:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 1:31 Ching Huang [this message]
2017-11-23 11:43 ` [PATCH 2/3] scsi: arcmsr: Add driver module parameter msix_enable Dan Carpenter
2017-11-23 19:11 ` Ching Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1511400674.9832.23.camel@Centos6.3-64 \
--to=ching2048@areca.com.tw \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dan.carpenter@oracle.com \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).