Tim Waugh (tim@cyberelk.demon.co.uk)
Mon, 13 Jul 1998 15:13:02 +0100 (BST)
On Mon, 13 Jul 1998, Philip Blundell wrote:
> >At this point, I can stop ppa and lp, and the situation is that ppuser0
> >has waiting=3, but the wait-queue is empty.
>
> That's consistent with what I saw in the code, then.
Is it? Changing the "waiting & 2" test to "waiting & 1" wouldn't fix it,
because waiting is 3.
My understanding of the bits in waiting is:
bit 0: I am in the wait-queue.
bit 1: I can be woken.
The wait-queue is empty, but waiting bit 0 claims it shouldn't be.
There's a bit of code that goes:
/* Can't fail from now on, so mark ourselves as no longer waiting. */
if (dev->waiting & 1) {
dev->waiting = 0;
/* Take ourselves out of the wait list again. */
spin_lock_irqsave (&port->lock, flags);
if (dev->waitprev)
dev->waitprev->waitnext = dev->waitnext;
else
The "dev->waiting = 0;" line looks suspicious because the spinlock isn't
held and it probably should be, but I'm not convinced that it's the
problem.
Tim.
*/
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:17:57 EST