diff mbox series

scsi: csiostor: remove automatic irq affinity assignment

Message ID 1541868282-4583-1-git-send-email-varun@chelsio.com (mailing list archive)
State Deferred
Headers show
Series scsi: csiostor: remove automatic irq affinity assignment | expand

Commit Message

Varun Prakash Nov. 10, 2018, 4:44 p.m. UTC
If number of interrupt vectors are more than num_online_cpus()
then pci_alloc_irq_vectors_affinity() assigns cpumask based
on num_possible_cpus() to the remaining vectors because of
this interrupts are not generating for these vectors.

This patch fixes this issue by using pci_alloc_irq_vectors()
instead of pci_alloc_irq_vectors_affinity().

Signed-off-by: Varun Prakash <varun@chelsio.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/scsi/csiostor/csio_isr.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Martin K. Petersen Nov. 22, 2018, 3:25 a.m. UTC | #1
Christoph/Thomas: Please review. Varun has solicited feedback on this a
few times already.

Thanks!

> If number of interrupt vectors are more than num_online_cpus() then
> pci_alloc_irq_vectors_affinity() assigns cpumask based on
> num_possible_cpus() to the remaining vectors because of this
> interrupts are not generating for these vectors.
>
> This patch fixes this issue by using pci_alloc_irq_vectors() instead
> of pci_alloc_irq_vectors_affinity().
>
> Signed-off-by: Varun Prakash <varun@chelsio.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> ---
>  drivers/scsi/csiostor/csio_isr.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/csiostor/csio_isr.c b/drivers/scsi/csiostor/csio_isr.c
> index 7c88147..8b92c59 100644
> --- a/drivers/scsi/csiostor/csio_isr.c
> +++ b/drivers/scsi/csiostor/csio_isr.c
> @@ -480,7 +480,6 @@ csio_enable_msix(struct csio_hw *hw)
>  	int i, j, k, n, min, cnt;
>  	int extra = CSIO_EXTRA_VECS;
>  	struct csio_scsi_cpu_info *info;
> -	struct irq_affinity desc = { .pre_vectors = 2 };
>  
>  	min = hw->num_pports + extra;
>  	cnt = hw->num_sqsets + extra;
> @@ -491,8 +490,7 @@ csio_enable_msix(struct csio_hw *hw)
>  
>  	csio_dbg(hw, "FW supp #niq:%d, trying %d msix's\n", hw->cfg_niq, cnt);
>  
> -	cnt = pci_alloc_irq_vectors_affinity(hw->pdev, min, cnt,
> -			PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, &desc);
> +	cnt = pci_alloc_irq_vectors(hw->pdev, min, cnt,	PCI_IRQ_MSIX);
>  	if (cnt < 0)
>  		return cnt;
diff mbox series

Patch

diff --git a/drivers/scsi/csiostor/csio_isr.c b/drivers/scsi/csiostor/csio_isr.c
index 7c88147..8b92c59 100644
--- a/drivers/scsi/csiostor/csio_isr.c
+++ b/drivers/scsi/csiostor/csio_isr.c
@@ -480,7 +480,6 @@  csio_enable_msix(struct csio_hw *hw)
 	int i, j, k, n, min, cnt;
 	int extra = CSIO_EXTRA_VECS;
 	struct csio_scsi_cpu_info *info;
-	struct irq_affinity desc = { .pre_vectors = 2 };
 
 	min = hw->num_pports + extra;
 	cnt = hw->num_sqsets + extra;
@@ -491,8 +490,7 @@  csio_enable_msix(struct csio_hw *hw)
 
 	csio_dbg(hw, "FW supp #niq:%d, trying %d msix's\n", hw->cfg_niq, cnt);
 
-	cnt = pci_alloc_irq_vectors_affinity(hw->pdev, min, cnt,
-			PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, &desc);
+	cnt = pci_alloc_irq_vectors(hw->pdev, min, cnt,	PCI_IRQ_MSIX);
 	if (cnt < 0)
 		return cnt;