Re: [PARPORT] ioctl(parport, PPCLAIM) hangs?

From: Bob Tanner (tanner@real-time.com)
Date: Fri Apr 25 2003 - 15:07:49 EDT

  • Next message: Robert Heller: "Re: [PARPORT] partitions on Zip disk, ATAPI Zip drive via pf, on26, paride"

    On Friday 25 April 2003 07:13 am, Tim Waugh wrote:
    > On Thu, Apr 24, 2003 at 12:41:03PM -0500, Bob Tanner wrote:
    > > I switch the BIOS to EPP 1.9 mode, now the following code hangs.
    > >
    > > int parport = open("/dev/parport0", O_RDWR|O_NOCTTY);
    > > ioctl(parport, PPCLAIM); <-- hangs
    > >
    > > Why would the ioctl() hang when I try to claim the port?
    >
    > Because some other driver has the port already and isn't letting it
    > go. It's also a badly-behaved driver, since if it isn't going to let
    > go of the port it ought to have asked for exclusive access in the
    > first place (in which case the open would have failed I think).
    >
    > It might be the lp driver: in interrupt-driven mode it doesn't behave
    > nicely like it should.
    >
    > Find out: /proc/sys/dev/parport/parport0/devices/active

    Ugh! Yep, a badly behaving user-space parport program. I've had a little
    "discussion" with the team member about learning to share. :-)

    Thanks for the advise.

    -- 
    Bob Tanner <tanner@real-time.com>         | Phone : (952)943-8700
    http://www.mn-linux.org, Minnesota, Linux | Fax   : (952)943-8500
    Key fingerprint = AB15 0BDF BCDE 4369 5B42  1973 7CF1 A709 2CC1 B288
    

    -- 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 : Fri Apr 25 2003 - 21:09:52 EDT