Re: [PARPORT] lp locks with three devs on parport

Jochen Hoenicke (Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE)
Mon, 13 Jul 98 17:29 MET DST


I looked at the code and found this: port->waittail isn't updated when
the second device is added to the waitlist. This would also explain,
why it only happens with three devices.


      spin_lock_irqsave (&port->lock, flags);
      if (port->cad == NULL) {
         /* The port got released in the meantime. */
         spin_unlock_irqrestore (&port->lock, flags);
         goto try_again;
      if (test_and_set_bit(0, &dev->waiting) == 0) {
         /* First add ourselves to the end of the wait list. */
         dev->waitnext = NULL;
         dev->waitprev = port->waittail;
         if (port->waittail)
            port->waittail->waitnext = dev;
         else {
            port->waithead = dev->port->waittail = dev;
                             only executed when waittail was NULL.
      spin_unlock_irqrestore (&port->lock, flags);

-- To unsubscribe, send mail to: --
-- 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