* error handling in 2.6.x
@ 2004-09-01 20:18 Scott T. Smith
2004-09-01 21:50 ` Brian King
0 siblings, 1 reply; 3+ messages in thread
From: Scott T. Smith @ 2004-09-01 20:18 UTC (permalink / raw)
To: linux-scsi
I'm modifying an error handler for a 2.6.x driver
(eh_device_reset_handler and eh_bus_reset_handler) and am wondering if I
can use semaphores... is it called from a user context, or is it called
from a "bottom half"? Given that I see scsi_eh_%d processes on my
machine, I assume it's called from a user context, but I just wanted to
be sure first.
Scott
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: error handling in 2.6.x
2004-09-01 20:18 error handling in 2.6.x Scott T. Smith
@ 2004-09-01 21:50 ` Brian King
2004-09-01 22:42 ` Scott T. Smith
0 siblings, 1 reply; 3+ messages in thread
From: Brian King @ 2004-09-01 21:50 UTC (permalink / raw)
To: Scott T. Smith; +Cc: linux-scsi
They are called from a kernel thread, so they can sleep if necessary.
They are called with the host_lock held, so make sure to drop the lock
before you sleep.
-Brian
Scott T. Smith wrote:
> I'm modifying an error handler for a 2.6.x driver
> (eh_device_reset_handler and eh_bus_reset_handler) and am wondering if I
> can use semaphores... is it called from a user context, or is it called
> from a "bottom half"? Given that I see scsi_eh_%d processes on my
> machine, I assume it's called from a user context, but I just wanted to
> be sure first.
>
> Scott
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: error handling in 2.6.x
2004-09-01 21:50 ` Brian King
@ 2004-09-01 22:42 ` Scott T. Smith
0 siblings, 0 replies; 3+ messages in thread
From: Scott T. Smith @ 2004-09-01 22:42 UTC (permalink / raw)
To: brking; +Cc: linux-scsi
On Wed, 2004-09-01 at 14:50, Brian King wrote:
> They are called from a kernel thread, so they can sleep if necessary.
> They are called with the host_lock held, so make sure to drop the lock
> before you sleep.
ah ok, thanks... I now see in scsi_error where it is locking host_lock.
Unfortunately, I don't have the flags to go along with it, so I guess
I'll just take a stab and call spin_unlock_irq and hope it isn't nested
inside another spinlock. I (quickly) grepped for spin_lock within
scsi*.c and none of the other locks looked important (haha famous last
words!)
Scott
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-09-01 22:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-01 20:18 error handling in 2.6.x Scott T. Smith
2004-09-01 21:50 ` Brian King
2004-09-01 22:42 ` Scott T. Smith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox