[PARPORT] Re: [patch] parport waitlist oops

From: Philip Blundell (philb@gnu.org)
Date: Sun Aug 12 2001 - 10:24:08 EDT

  • Next message: Tim Waugh: "[PARPORT] Re: [patch] parport waitlist oops"

    >Hey, take a look at this patch. The bad news is that we can't just
    >wander along the wait list without a lock. I don't know if the
    >supplied wakeup function is allowed to call parport_release or
    >parport_unregister_device: if so then it's awkward since we might
    >deadlock.

    Hmm, yeah. I think there is another way to solve the particular problem that
    seems to be at hand: don't own up to having a wakeup function when you first
    register your driver, call parport_claim() repeatedly in the loop rather than
    checking p_busy, and then poke your function into dev->wakeup once you are
    committed to using the port. Once probing is over the module use count should
    stop the driver getting unloaded at an inopportune moment.

    But I agree the underlying problem ought really to be dealt with properly.
    I'll give it some more thought, but my initial reaction would be that no, it
    isn't reasonable to call parport_release or parport_unregister_device from
    your wakeup function.

    p.



    -- 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 2b29 : Sun Aug 12 2001 - 10:31:04 EDT