linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] scsi: arcmsr: Add driver module parameter msix_enable
@ 2017-11-23  1:31 Ching Huang
  2017-11-23 11:43 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Ching Huang @ 2017-11-23  1:31 UTC (permalink / raw)
  To: martin.petersen, James.Bottomley, linux-scsi, linux-kernel,
	jthumshirn, hare, dan.carpenter, hch

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/3] scsi: arcmsr: Add driver module parameter msix_enable
  2017-11-23  1:31 [PATCH 2/3] scsi: arcmsr: Add driver module parameter msix_enable Ching Huang
@ 2017-11-23 11:43 ` Dan Carpenter
  2017-11-23 19:11   ` Ching Huang
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2017-11-23 11:43 UTC (permalink / raw)
  To: Ching Huang
  Cc: martin.petersen, James.Bottomley, linux-scsi, linux-kernel,
	jthumshirn, hare, hch

On Thu, Nov 23, 2017 at 09:31:14AM +0800, Ching Huang wrote:
> @@ -829,12 +833,15 @@ arcmsr_request_irq(struct pci_dev *pdev,
>  	unsigned long flags;
>  	int nvec, i;
>  
> +	if (msix_enable == 0)
> +		goto msi_int0;

I feel like this goto is not very beautiful, but I can't actually apply
this patch?  Which tree is this written against?  I'm using linux-next.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/3] scsi: arcmsr: Add driver module parameter msix_enable
  2017-11-23 11:43 ` Dan Carpenter
@ 2017-11-23 19:11   ` Ching Huang
  0 siblings, 0 replies; 3+ messages in thread
From: Ching Huang @ 2017-11-23 19:11 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: martin.petersen, James.Bottomley, linux-scsi, linux-kernel,
	jthumshirn, hare, hch

On Thu, 2017-11-23 at 14:43 +0300, Dan Carpenter wrote:
> On Thu, Nov 23, 2017 at 09:31:14AM +0800, Ching Huang wrote:
> > @@ -829,12 +833,15 @@ arcmsr_request_irq(struct pci_dev *pdev,
> >  	unsigned long flags;
> >  	int nvec, i;
> >  
> > +	if (msix_enable == 0)
> > +		goto msi_int0;
> 
> I feel like this goto is not very beautiful, but I can't actually apply
> this patch?  Which tree is this written against?  I'm using linux-next.
> 
This patch is apply to https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git/tree/?h=4.16/scsi-queue

> regards,
> dan carpenter
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-24  3:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-23  1:31 [PATCH 2/3] scsi: arcmsr: Add driver module parameter msix_enable Ching Huang
2017-11-23 11:43 ` Dan Carpenter
2017-11-23 19:11   ` Ching Huang

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).