]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: megaraid_sas: fix the wrong way to get irq number
authorJianchao Wang <jianchao.w.wang@oracle.com>
Fri, 3 Aug 2018 05:32:43 +0000 (13:32 +0800)
committerBrian Maly <brian.maly@oracle.com>
Wed, 15 Aug 2018 21:30:54 +0000 (17:30 -0400)
commitcf2de3ad6dbf88ac1fa6e8462b50dfbb76312e26
tree6363e020a6092cfecc5d7de583a3e5e4fe5c8e79
parent7914cec67e200dfff60253c0fb429c82f681c718
scsi: megaraid_sas: fix the wrong way to get irq number

Customer's machine report following warning log:
WARNING: CPU: 7 PID: 934 at drivers/scsi/megaraid/kcompat.h:14 megasas_sync_irqs+0x7a/0x90 [megaraid_sas]()
...
CPU: 7 PID: 934 Comm: scsi_eh_0 Not tainted 4.1.12-112.14.2.el6uek.x86_64 #2
Hardware name: Dell Inc. PowerEdge M630/0R10KJ, BIOS 2.6.0 10/27/2017
Call Trace:
 [<ffffffff816eb150>] dump_stack+0x63/0x83
 [<ffffffff81086f25>] warn_slowpath_common+0x95/0xe0
 [<ffffffff81086f8a>] warn_slowpath_null+0x1a/0x20
 [<ffffffffa031a8ca>] megasas_sync_irqs+0x7a/0x90 [megaraid_sas]
 [<ffffffffa031e2d0>] megasas_reset_fusion+0xd0/0x8b0 [megaraid_sas]
 [<ffffffffa0314cbe>] megasas_reset_bus_host+0x8e/0x210 [megaraid_sas]
 [<ffffffff814ca1e6>] scsi_try_host_reset+0x56/0x120
 [<ffffffff814cd649>] scsi_eh_host_reset+0x59/0x180
 [<ffffffff814cd804>] scsi_eh_ready_devs+0x94/0x100
 [<ffffffff814cd97d>] scsi_unjam_host+0x10d/0x230
 [<ffffffff814cdc28>] scsi_error_handler+0x188/0x210
 [<ffffffff810a72de>] kthread+0xce/0xf0
 [<ffffffff816f11a2>] ret_from_fork+0x42/0x70

This is introduced by the 490515384dc4 (scsi: megaraid_sas: Use
synchronize_irq to wait for IRQs to complete). The introduced
pci_irq_vector() compatibility wrapper did not take all interrupt
delivery methods into account. We should use the instance->msixentry[]
to get the irq number for the case of instance->msix_vectors > 0.

Orabug: 28436426

Fixes: 490515384dc4 (scsi: megaraid_sas: Use synchronize_irq to wait for IRQs to complete)
Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
Cc: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Cc: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/megaraid/kcompat.h [deleted file]
drivers/scsi/megaraid/megaraid_sas_fusion.c