[PATCH] qla2xxx: spin_unlock_irq in IRQ context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

 The function qla2x00_ramp_up_queue_depth()  can be called in IRQ context.
 So spin_unlock_irq in qla2x00_ramp_up_queue_depth() is not appropriate.

Thanks.

Signed-off-by :Hisashi Hifumi <hifumi.hisashi@xxxxxxxxxxxxx>

--- linux-2.6.20-rc4.org/drivers/scsi/qla2xxx/qla_isr.c 2006-11-30 06:57:37.000000000 +0900 +++ linux-2.6.20-rc4/drivers/scsi/qla2xxx/qla_isr.c 2007-01-09 11:26:45.000000000 +0900
@@ -650,10 +650,18 @@ qla2x00_ramp_up_queue_depth(scsi_qla_hos
 	    fcport->last_queue_full + ql2xqfullrampup * HZ))
 		return;

-	spin_unlock_irq(&ha->hardware_lock);
+	if (in_irq())
+		spin_unlock(&ha->hardware_lock);
+	else
+		spin_unlock_irq(&ha->hardware_lock);
+
 	starget_for_each_device(sdev->sdev_target, fcport,
 	    qla2x00_adjust_sdev_qdepth_up);
-	spin_lock_irq(&ha->hardware_lock);
+
+	if (in_irq())
+		spin_lock(&ha->hardware_lock);
+	else
+		spin_lock_irq(&ha->hardware_lock);
 }

/**
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux