[PATCH for-next 04/32] scsi: qla4xxx: Replace spin_lock_irqsave with spin_lock in hard IRQ

Xiaofei Tan
2021-02-07T11:42:47Z

drivers/scsi/qla4xxx/ql4_isr.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c
index 6f0e77d..9c64c8b 100644
--- a/drivers/scsi/qla4xxx/ql4_isr.c
+++ b/drivers/scsi/qla4xxx/ql4_isr.c
@@ -1353,10 +1353,9 @@ qla4_8xxx_msi_handler(int irq, void *dev_id)
static irqreturn_t qla4_83xx_mailbox_intr_handler(int irq, void *dev_id)
{
struct scsi_qla_host *ha = dev_id;
- unsigned long flags;
uint32_t ival = 0;

- spin_lock_irqsave(&ha->hardware_lock, flags);
+ spin_lock(&ha->hardware_lock);

ival = readl(&ha->qla4_83xx_reg->risc_intr);
if (ival == 0) {
@@ -1377,7 +1376,7 @@ static irqreturn_t qla4_83xx_mailbox_intr_handler(int irq, void *dev_id)
writel(ival, &ha->qla4_83xx_reg->mb_int_mask);
ha->isr_count++;
exit:
- spin_unlock_irqrestore(&ha->hardware_lock, flags);
+ spin_unlock(&ha->hardware_lock);
return IRQ_HANDLED;
}

@@ -1393,14 +1392,13 @@ irqreturn_t
qla4_8xxx_default_intr_handler(int irq, void *dev_id)
{
struct scsi_qla_host *ha = dev_id;
- unsigned long flags;
uint32_t intr_status;
uint8_t reqs_count = 0;

if (is_qla8032(ha) || is_qla8042(ha)) {
qla4_83xx_mailbox_intr_handler(irq, dev_id);
} else {
- spin_lock_irqsave(&ha->hardware_lock, flags);
+ spin_lock(&ha->hardware_lock);
while (1) {
if (!(readl(&ha->qla4_82xx_reg->host_int) &
ISRX_82XX_RISC_INT)) {
@@ -1421,7 +1419,7 @@ qla4_8xxx_default_intr_handler(int irq, void *dev_id)
break;
}
ha->isr_count++;
- spin_unlock_irqrestore(&ha->hardware_lock, flags);
+ spin_unlock(&ha->hardware_lock);
}
return IRQ_HANDLED;
}
@@ -1430,11 +1428,10 @@ irqreturn_t
qla4_8xxx_msix_rsp_q(int irq, void *dev_id)
{
struct scsi_qla_host *ha = dev_id;
- unsigned long flags;
int intr_status;
uint32_t ival = 0;

- spin_lock_irqsave(&ha->hardware_lock, flags);
+ spin_lock(&ha->hardware_lock);
if (is_qla8032(ha) || is_qla8042(ha)) {
ival = readl(&ha->qla4_83xx_reg->iocb_int_mask);
if (ival == 0) {
@@ -1457,7 +1454,7 @@ qla4_8xxx_msix_rsp_q(int irq, void *dev_id)
}
ha->isr_count++;
exit_msix_rsp_q:
- spin_unlock_irqrestore(&ha->hardware_lock, flags);
+ spin_unlock(&ha->hardware_lock);
return IRQ_HANDLED;
}

--
2.8.1