[SCSI] ipr: ipr_test_msi() fails when running with msi-x enabled adapter
Loading ipr modules failed(-22) with msi-x enabled adapter. In ipr_test_msi(), We need to pass the first vector of msix vectors instead of using pdev->irq to request_irq() when adapter enables msix feature. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
fe69690942
commit
f19799f49d
|
@ -9349,7 +9349,10 @@ static int ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, struct pci_dev *pdev)
|
|||
int_reg = readl(ioa_cfg->regs.sense_interrupt_mask_reg);
|
||||
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
|
||||
|
||||
rc = request_irq(pdev->irq, ipr_test_intr, 0, IPR_NAME, ioa_cfg);
|
||||
if (ioa_cfg->intr_flag == IPR_USE_MSIX)
|
||||
rc = request_irq(ioa_cfg->vectors_info[0].vec, ipr_test_intr, 0, IPR_NAME, ioa_cfg);
|
||||
else
|
||||
rc = request_irq(pdev->irq, ipr_test_intr, 0, IPR_NAME, ioa_cfg);
|
||||
if (rc) {
|
||||
dev_err(&pdev->dev, "Can not assign irq %d\n", pdev->irq);
|
||||
return rc;
|
||||
|
@ -9371,7 +9374,10 @@ static int ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, struct pci_dev *pdev)
|
|||
|
||||
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
|
||||
|
||||
free_irq(pdev->irq, ioa_cfg);
|
||||
if (ioa_cfg->intr_flag == IPR_USE_MSIX)
|
||||
free_irq(ioa_cfg->vectors_info[0].vec, ioa_cfg);
|
||||
else
|
||||
free_irq(pdev->irq, ioa_cfg);
|
||||
|
||||
LEAVE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue