* [PATCH 0/1] ipr_test_msi() failed when running msi-x enabled adapter
@ 2013-02-27 18:37 wenxiong
2013-02-27 18:37 ` [PATCH 1/1] ipr: ipr_test_msi() fails when running with " wenxiong
0 siblings, 1 reply; 3+ messages in thread
From: wenxiong @ 2013-02-27 18:37 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, brking, klebers
Loading ipr module failed(-22)with msi-x enabled adapter. This patch
fixes the issue.
Thanks for your help!
Wendy
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] ipr: ipr_test_msi() fails when running with msi-x enabled adapter
2013-02-27 18:37 [PATCH 0/1] ipr_test_msi() failed when running msi-x enabled adapter wenxiong
@ 2013-02-27 18:37 ` wenxiong
2013-02-28 18:59 ` Brian King
0 siblings, 1 reply; 3+ messages in thread
From: wenxiong @ 2013-02-27 18:37 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, brking, klebers, Wen Xiong
[-- Attachment #1: test_msi_fail --]
[-- Type: text/plain, Size: 1441 bytes --]
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>
---
drivers/scsi/ipr.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
Index: b/drivers/scsi/ipr.c
===================================================================
--- a/drivers/scsi/ipr.c 2013-02-26 20:13:42.000000000 -0600
+++ b/drivers/scsi/ipr.c 2013-02-27 12:02:32.578032480 -0600
@@ -9349,7 +9349,10 @@ static int ipr_test_msi(struct ipr_ioa_c
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_c
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;
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] ipr: ipr_test_msi() fails when running with msi-x enabled adapter
2013-02-27 18:37 ` [PATCH 1/1] ipr: ipr_test_msi() fails when running with " wenxiong
@ 2013-02-28 18:59 ` Brian King
0 siblings, 0 replies; 3+ messages in thread
From: Brian King @ 2013-02-28 18:59 UTC (permalink / raw)
To: wenxiong; +Cc: James.Bottomley, linux-scsi, klebers
Acked-by: Brian King <brking@linux.vnet.ibm.com>
--
Brian King
Power Linux I/O
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-28 19:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27 18:37 [PATCH 0/1] ipr_test_msi() failed when running msi-x enabled adapter wenxiong
2013-02-27 18:37 ` [PATCH 1/1] ipr: ipr_test_msi() fails when running with " wenxiong
2013-02-28 18:59 ` Brian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox