mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* spin locks and timers in scsi hba driver
@ 2001-10-15 22:01 MEHTA,HIREN (A-SanJose,ex1)
  2001-10-15 22:10 ` arjan
  0 siblings, 1 reply; 4+ messages in thread
From: MEHTA,HIREN (A-SanJose,ex1) @ 2001-10-15 22:01 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org'

Hi List,

I want to make sure that my hba-driver timers do run
when the uppar scsi-layer calls any of the error handler entry points
and while I am still doing the error handling. As I know, scsi-layer
calls spin_lock_irqsave(&io_request_lock, flags) before calling the
error handlers and they call spin_unlock_irqrestore(&io_request_lock, flags)
after returning from the error handlers. So, inside the error handlers,
I call spin_unlock_irq(&io_request_lock); wait for the timers to run,
and the again call spin_lock_irq(&io_request_lock). 

But this does not seem to be working. Even after I call
spin_unlock_irq(&io_request_lock), I don't see my timer routines getting
called.
Can somebody advise me on how to achive this ? I cannot use 
spin_unlock_irqrestore() as I do not have the saved 'flags' value.

TIA.
-hiren

^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: spin locks and timers in scsi hba driver
@ 2001-10-15 22:44 MEHTA,HIREN (A-SanJose,ex1)
  2001-10-16  6:52 ` Arjan van de Ven
  0 siblings, 1 reply; 4+ messages in thread
From: MEHTA,HIREN (A-SanJose,ex1) @ 2001-10-15 22:44 UTC (permalink / raw)
  To: 'arjan@fenrus.demon.nl'; +Cc: 'linux-kernel@vger.kernel.org'

Well, I thought spin_unlock_irq() is supposed to enable all maskable
interrupts
by setting IF flag in the EFLAGS register which gets cleared by
local_irq_save().
I understand that spin_unlock_irq does not restore all the flags. But it
atleast sets the IF flag which enables the interrupt. I believe that this
is atleast true in case of intel x86 arch. We have not made our sources
open-source yet. So I cannot give out the sources. Sorry.

Thanks and regards,
-hiren

-----Original Message-----
From: arjan@fenrus.demon.nl [mailto:arjan@fenrus.demon.nl]
Sent: Monday, October 15, 2001 3:11 PM
To: hiren_mehta@agilent.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: spin locks and timers in scsi hba driver


In article <01A7DAF31F93D511AEE300D0B706ED9208E495@axcs13.cos.agilent.com>
you wrote:
> Hi List,

> I want to make sure that my hba-driver timers do run
> when the uppar scsi-layer calls any of the error handler entry points
> and while I am still doing the error handling. As I know, scsi-layer
> calls spin_lock_irqsave(&io_request_lock, flags) before calling the
> error handlers and they call spin_unlock_irqrestore(&io_request_lock,
flags)
> after returning from the error handlers. So, inside the error handlers,
> I call spin_unlock_irq(&io_request_lock); wait for the timers to run,
> and the again call spin_lock_irq(&io_request_lock). 

well interrupts are still disabled...
Could you give an URL to the source of your driver so that I and others can
see what you really are trying to do ?

Greetings,
   Arjan van de Ven

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

end of thread, other threads:[~2001-10-16  6:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-15 22:01 spin locks and timers in scsi hba driver MEHTA,HIREN (A-SanJose,ex1)
2001-10-15 22:10 ` arjan
2001-10-15 22:44 MEHTA,HIREN (A-SanJose,ex1)
2001-10-16  6:52 ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®