Re: [PATCH] qla2xxx: spin_unlock_irq in IRQ context

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

 



On Tue, Jan 09, 2007 at 04:46:34PM +0900, Hisashi Hifumi wrote:
> Hi
> 
> >If the function can be called with interrupts disabled as well as
> >enabled, then the spin_lock_irq needs to become a spin_lock_irqsave()
> >which is the correct API for this case.
> 
> I know that spin_lock_irqsave()/spin_unlock_irqrestore() is correct .
> But in this case, many places need to be modified to use
> spin_lock_irqsave()/spin_unlock_irqrestore().Because
> spin_lock_irqsave()/spin_unlock_irqrestore() is not in the same function,
> and it is needed to pass eflags.
> 
> So I use in_irq() to distinguish between IRQ and process context and
> minimize modifications.

Why do we need to re-enable interrupts here?  Can't we just
spin_unlock() / spin_lock()?  Actually, I don't see why we need to drop
the lock here ... starget_for_each_device can be called under a
spinlock.  qla2x00_adjust_sdev_qdepth_up() only calls
scsi_adjust_queue_depth().  Is there an AB-BA issue with hardware_lock
and request_queue->queue_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