Skip to content

Commit 0e973a2

Browse files
avasquez01James Bottomley
authored andcommitted
[SCSI] qla2xxx: Correct locking within MSI-X interrupt handlers.
Both MSI-X vector handlers attempt to acquire the HA's hardware_lock. This though requires that interrupts be disabled/enabled during acquisition and release of the spinlock. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1 parent fd9a29f commit 0e973a2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/scsi/qla2xxx/qla_isr.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,12 +1639,12 @@ qla24xx_msix_rsp_q(int irq, void *dev_id)
16391639
ha = dev_id;
16401640
reg = &ha->iobase->isp24;
16411641

1642-
spin_lock(&ha->hardware_lock);
1642+
spin_lock_irq(&ha->hardware_lock);
16431643

16441644
qla24xx_process_response_queue(ha);
16451645
WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT);
16461646

1647-
spin_unlock(&ha->hardware_lock);
1647+
spin_unlock_irq(&ha->hardware_lock);
16481648

16491649
return IRQ_HANDLED;
16501650
}
@@ -1663,7 +1663,7 @@ qla24xx_msix_default(int irq, void *dev_id)
16631663
reg = &ha->iobase->isp24;
16641664
status = 0;
16651665

1666-
spin_lock(&ha->hardware_lock);
1666+
spin_lock_irq(&ha->hardware_lock);
16671667
do {
16681668
stat = RD_REG_DWORD(&reg->host_status);
16691669
if (stat & HSRX_RISC_PAUSED) {
@@ -1716,7 +1716,7 @@ qla24xx_msix_default(int irq, void *dev_id)
17161716
}
17171717
WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT);
17181718
} while (0);
1719-
spin_unlock(&ha->hardware_lock);
1719+
spin_unlock_irq(&ha->hardware_lock);
17201720

17211721
if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) &&
17221722
(status & MBX_INTERRUPT) && ha->flags.mbox_int) {

0 commit comments

Comments
 (0)