All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qla2xxx: spin_unlock_irq in IRQ context
@ 2007-01-09  5:35 Hisashi Hifumi
  2007-01-09  7:27 ` James Bottomley
  0 siblings, 1 reply; 4+ messages in thread
From: Hisashi Hifumi @ 2007-01-09  5:35 UTC (permalink / raw)
  To: andrew.vasquez, linux-scsi

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@oss.ntt.co.jp>

--- 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);
  }

  /** 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-09 12:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-09  5:35 [PATCH] qla2xxx: spin_unlock_irq in IRQ context Hisashi Hifumi
2007-01-09  7:27 ` James Bottomley
2007-01-09  7:46   ` Hisashi Hifumi
2007-01-09 12:29     ` Matthew Wilcox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.