Re: [PATCH] to drivers/parport/ieee1284_ops.c to fix timing dependent hang

From: Tim Josling (tej@melbpc.org.au)
Date: Sat Mar 22 2003 - 15:31:50 EST


Jeremy Fitzhardinge wrote:
> On Sat, 2003-03-22 at 01:23, Tim Josling wrote:
>
>>According to my reading of the code, it should only happen in polled
>>mode, but I have only one week of experience looking at kernel source.
>
>
> I'm wondering if a better fix might be to have something like:
>
> if (wait * 2 > wait)
> wait *= 2;
>
> at the bottom of the loop, so that the wrap-around doesn't happen.
>

I tried
  wait *=2;
        if (wait > 10 * HZ)
                wait = 10 * HZ;
and that worked, so your theory would probably work. However to my mind
it is a hack.

>
>>So it should be a work-around, assuming interrupts work on the parallel
>>port on your system :-). It is an very vexing problem, as I'm sure you know.
>>
>>By the way, LJ1100s tend to get page feeding problems about the time the
>>warranty runs out, but HP has a free kit you can order to fix the problem.
>
>
> Yes, I just installed it. It suddenly made the printer useful again, so
> I've printing more, and seeing the hangs. I enabled interrupts, which
> seems to work OK.
>
> J

Good. That (enabling interrupts fixes the problem) tends to add credence
to my theory.

Happy printing!

Tim Josling

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:42 EST