Re: plip.c and transmit timeout madness

Alexander Viro (viro@math.psu.edu)
Thu, 28 Jan 1999 02:41:44 -0500 (EST)


On Thu, 28 Jan 1999, Shaun Wilson wrote:

> It seems taht for whatever reason teh first patch extends teh time which
> teh interface remains functional, oterh than that, I'm at a loss because I
> can't see anything besides two macros and a new HS_TIMEOUT define that is
> new to plip.c
>
> I've emailed the maintainer before(gniibe@*.jp) and received no response,
> so if anyone knows what the purpose behind HS_TIMEOUT is please fill me
> in, afaik it's nothing more than a method of capturing a timeout specific
> to the transmit operation, which would also be my problem.

HS_TIMEOUT is the result of rebalancing enable/disable_irq()
stuff. When somebody (Andrea?) changed enable/disable_irq() semantics old
PLIP code broke. These days disable_irq();disable_irq();enable_irq();
leaves IRQ *disabled*, not enabled as it used to do. Now, we need to
have equal amounts of eanble_irq() and disable_irq() on every loop. If
you'll look at sending part you'll see that there are two kinds of exits -
ones from the handshaking phase vs. everything else. They leave different
number of disable_irq() to undo. Hence the special return value - it
allows to compensate the stuff in error recovery.
Look for my posting on l-k ([PATCH] plip breakage (2.2.0-pre1))
and comments in drivers/net/plip.c (line 382) for details.
Be *very* accurate with irq stuff - rules had been changed here.

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