Re: [PATCH]: Flexible timeout infrastructure

Mike Anderson
2004-06-15T18:15:40Z

James Bottomley [James.Bottomley@steeleye.com] wrote:
> On Tue, 2004-06-15 at 10:02, Luben Tuikov wrote:
> > This patch introduces a flexible command timeout infrastructure
> > accomodating completely current behaviour SCSI Core command timeout,
> > but also offering the ability to hand command timeout handling to
> > a LLDD, _yet_ still have it all go through *SCSI Core*.
>
> But what this basically does is force any implementor of
> eh_cmd_timed_out to handle all timers themselves. Given that a large
> number of driver writers who try to do this get it wrong (mostly around
> del_timer() and del_timer_sync()), I don't think this is such a good
> idea.
>
> > This is somewhat similar to Christoph's proposal patch, but I wasn't
> > aware of his patch when I thought of this. Interestingly enough it can be
> > viewed as an extension to his patch.
>
> This proposal was to allow LLD notification that the timer fired (rather
> than first hearing about it when the eh activated). I could see an
> extension to this, like the return values you propose, where the LLD
> tells the mid-layer that it corrected the command problem (in interrupt
> context) and the command is ready for completion (otherwise proceed into
> the eh).
>

Could we get the eh_times_out part of the patch broken out as the
addition of the return values look like a good idea along with some
method to call a modified version of scsi_done through a exported
function to the LLDD.

-andmike
--
Michael Anderson
andmike@us.ibm.com