* initio.h header user confusion
@ 2007-02-21 16:12 Srdjan Todorovic
2007-02-21 16:20 ` Matthew Wilcox
2007-02-21 16:57 ` James Bottomley
0 siblings, 2 replies; 6+ messages in thread
From: Srdjan Todorovic @ 2007-02-21 16:12 UTC (permalink / raw)
To: linux-scsi
Hi,
I'm working on a set of patches for the initio scsi driver and I found
some strangeness with its header file, initio.h. I noticed that
sun3_scsi.c and sun3_scsi_vme.c include the header, and it uses defines
such as SCSI_ABORT_SNOOZE (defined in initio.h).
I did some grepping and am now confused. Grepping the entire kernel tree
like so:
grep -r SCSI_ABORT_ ~/kernelcoding/linux-2.6-rc-latest/*
gives me a handful of scsi drivers that use these defines.
Grepping the kernel source for these defines like so:
grep -r SCSI_ABORT_ ~/kernelcoding/linux-2.6-rc-latest/* | grep define
only gives me drivers/scsi/initio.h, so they are only defined in
initio.h
Grepping the whole kernel source for drivers/headers that include
initio.h like so:
grep -r "initio.h" ~/kernelcoding/linux-2.6-rc-latest/*
only gives me 3 results - initio.c, sun3_scsi.c and sun3_scsi_vme.c.
So how is it possible that other drivers such as aha1542.c use these defines?
Can anyone please explain this as it's really confused me, and I want
to make sure that my patches don't break other drivers when I post
them here.
Many thanks,
Srdjan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: initio.h header user confusion
2007-02-21 16:12 initio.h header user confusion Srdjan Todorovic
@ 2007-02-21 16:20 ` Matthew Wilcox
2007-02-21 16:36 ` Srdjan Todorovic
2007-02-21 16:57 ` James Bottomley
1 sibling, 1 reply; 6+ messages in thread
From: Matthew Wilcox @ 2007-02-21 16:20 UTC (permalink / raw)
To: Srdjan Todorovic; +Cc: linux-scsi
On Wed, Feb 21, 2007 at 04:12:06PM +0000, Srdjan Todorovic wrote:
> So how is it possible that other drivers such as aha1542.c use these defines?
Possibly, they don't. I just looked at the ncr53c8xx driver, and the
only uses of SCSI_ABORT_* are inside an #if 0 block. The same is true
for aha1542.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: initio.h header user confusion
2007-02-21 16:20 ` Matthew Wilcox
@ 2007-02-21 16:36 ` Srdjan Todorovic
2007-02-21 16:52 ` Matthew Wilcox
0 siblings, 1 reply; 6+ messages in thread
From: Srdjan Todorovic @ 2007-02-21 16:36 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-scsi
On Wed, 21 Feb 2007, Matthew Wilcox wrote:
> On Wed, Feb 21, 2007 at 04:12:06PM +0000, Srdjan Todorovic wrote:
> > So how is it possible that other drivers such as aha1542.c use these defines?
>
> Possibly, they don't. I just looked at the ncr53c8xx driver, and the
> only uses of SCSI_ABORT_* are inside an #if 0 block. The same is true
> for aha1542.
Those pesky #if 0 blocks are annoying.
I just looked at aha1542.c and saw layered #if 0 blocks. :-|
I'll recheck the other drivers then. It would seem the only users then
are initio and sun3*. What's the best thing to do about it?
Should I keep things as they are with SCSI_ABORT_* or should I
move them to include/scsi/ or something entirely different?
Thanks,
Srdjan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: initio.h header user confusion
2007-02-21 16:36 ` Srdjan Todorovic
@ 2007-02-21 16:52 ` Matthew Wilcox
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Wilcox @ 2007-02-21 16:52 UTC (permalink / raw)
To: Srdjan Todorovic; +Cc: linux-scsi
On Wed, Feb 21, 2007 at 04:36:59PM +0000, Srdjan Todorovic wrote:
> I'll recheck the other drivers then. It would seem the only users then
> are initio and sun3*. What's the best thing to do about it?
> Should I keep things as they are with SCSI_ABORT_* or should I
> move them to include/scsi/ or something entirely different?
These drivers ought to be moved away from using SCSI_ABORT_*. If you
don't have the expertise and hardware to do this, best to leave them
alone.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: initio.h header user confusion
2007-02-21 16:12 initio.h header user confusion Srdjan Todorovic
2007-02-21 16:20 ` Matthew Wilcox
@ 2007-02-21 16:57 ` James Bottomley
2007-02-21 17:33 ` Srdjan Todorovic
1 sibling, 1 reply; 6+ messages in thread
From: James Bottomley @ 2007-02-21 16:57 UTC (permalink / raw)
To: Srdjan Todorovic; +Cc: linux-scsi
On Wed, 2007-02-21 at 16:12 +0000, Srdjan Todorovic wrote:
> I'm working on a set of patches for the initio scsi driver and I found
> some strangeness with its header file, initio.h. I noticed that
> sun3_scsi.c and sun3_scsi_vme.c include the header, and it uses defines
> such as SCSI_ABORT_SNOOZE (defined in initio.h).
It's a remnant of the old 2.4 error handler and should be excised.
In early 2.4 or perhaps even 2.2 the error handler ran in interrupt
context, so there was no way of waiting for an abort to complete, hence
this return value (it told the eh to wait a while for the abort).
In 2.6 all eh routines run in the context of the host eh thread, so you
can use standard msleep() etc. calls to wait for aborts to timeout or
complete.
James
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: initio.h header user confusion
2007-02-21 16:57 ` James Bottomley
@ 2007-02-21 17:33 ` Srdjan Todorovic
0 siblings, 0 replies; 6+ messages in thread
From: Srdjan Todorovic @ 2007-02-21 17:33 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi
On Wed, 21 Feb 2007, James Bottomley wrote:
> On Wed, 2007-02-21 at 16:12 +0000, Srdjan Todorovic wrote:
> > I'm working on a set of patches for the initio scsi driver and I found
> > some strangeness with its header file, initio.h. I noticed that
> > sun3_scsi.c and sun3_scsi_vme.c include the header, and it uses defines
> > such as SCSI_ABORT_SNOOZE (defined in initio.h).
>
> It's a remnant of the old 2.4 error handler and should be excised.
>
> In early 2.4 or perhaps even 2.2 the error handler ran in interrupt
> context, so there was no way of waiting for an abort to complete, hence
> this return value (it told the eh to wait a while for the abort).
>
> In 2.6 all eh routines run in the context of the host eh thread, so you
> can use standard msleep() etc. calls to wait for aborts to timeout or
> complete.
>
> James
Thanks for a good short explanation on the scsi error handling.
I poked around a bit more and all but one cases of SCSI_RESET_* are
in #if 0 blocks. The one case is tul_reset_scsi() which returns a
SCSI_RESET_SUCCESS value, which is discarded by the caller anyway.
SCSI_ABORT_* is only used in tul_abort_srb(). This doesn't use the
new error handler threads.
As Matthew Wilcox suggested in a previous email in this thread,
I don't have the expertise to fix this (though I do have the hardware).
I'd like to read up on scsi eh just the same, and might have a go
at fixing this at some point.
Thanks
Srdjan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-02-21 17:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-21 16:12 initio.h header user confusion Srdjan Todorovic
2007-02-21 16:20 ` Matthew Wilcox
2007-02-21 16:36 ` Srdjan Todorovic
2007-02-21 16:52 ` Matthew Wilcox
2007-02-21 16:57 ` James Bottomley
2007-02-21 17:33 ` Srdjan Todorovic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox