Re: [PARPORT] Questions with ppdev

From: Michael Reinelt (reinelt@eunet.at)
Date: Thu Mar 15 2001 - 05:04:41 EST

  • Next message: Tim Waugh: "Re: [PARPORT] Questions with ppdev"

    Tim Waugh wrote:

    > Not having exclusive access just means that another driver might
    > possibly try talking to (another device on) the port. This is only
    > really an issue for devices that won't work in daisy-chain
    > configurations, even as the last device on the chain. In particular,
    > if your device is going to be claiming the port and not releasing it
    > for large amounts of time (thirty seconds, a minute, minutes, etc), it
    > should probably claim the port exclusively.

    I understand. I think lcd4linux should claim it exclusively, because it
    does a lot of things with the control lines, which could have strange
    effects on any other device.

    But I want kind of a 'fallback', because a lot of users will not load
    lp.o with the right options. I wnat to get exclusive access, If I can't
    get it, I will print a big fat warning, and continue without exclusive
    access. Is there a way to clear the EXCL flag (other than closing an
    reopening the device?)

    > You should alias 'parport_lowlevel' to parport_pc in modules.conf.
    > When your driver opens the ppdev port, 'parport_lowlevel' will get
    > loaded.
    Thanks.

    But how does lp.o load parport_pc?

    > Did you enable 'PARPORT_LP_CONSOLE' when you configured your kernel?
    > If so, lp can't be unloaded.

    Thanks again! That's it!

    > > I don't like c) because it's non-portable and not available on older
    > > cpu's
    >
    > select() is portable, but you don't get a guaranteed maximum delay.

    Hmmm, what was c)? Oh, looping on rdtsc.

    I don't think that select() has microsecond resolution, I suppose it
    will reschedule and therefore have at least a 10ms delay (which is far
    too long). But I will have a look at the kernel code..

    bye, Michael

    -- 
    netWorks       	                                  Vox: +43 316  692396
    Michael Reinelt                                   Fax: +43 316  692343
    Geisslergasse 4					  GSM: +43 676 3079941
    A-8045 Graz, Austria			      e-mail: reinelt@eunet.at
    

    -- 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 : Thu Mar 15 2001 - 05:09:01 EST