[PARPORT] Where are my interrupts ?

From: Luc Pardon (lucp@skopos.be)
Date: Tue Apr 02 2002 - 14:06:05 EST

  • Next message: Stefan Riha: "[PARPORT] IO errors"

    Hello list,

      I'm writing a driver for a custom-made piece of hardware (basically an
    interface card) attached to the parallel port.

      It works fine, i.e. the driver compiles, loads, .. and I can read and
    write and make the lights on the card go on and off. Cool.

      Now I try to enable interrupts, but no go. I just want the base SPP
    acknowledge, no fancy EPP/ECP handshakes. But no matter how much I
    switch pin 10 on the parallel port up and down (between 0 and +5V), no
    interrupts.

      This is on RedHat Linux 7.2, uname -r -> 2.4.7-10

      What I'm getting thus far:

      * the cable is OK, it does deliver pin 10 into the PC's serial port

      * the parallel port is configured in the BIOS as 0x378, irq 7, SPP
    mode (tried EPP etc, no change) on an oldish PC.

      * parport_pc loads with options from /etc/modules.conf, and uses irq 7

      * /proc/interrupts shows irq 7 in use by parport0, but counter at 0

      * "dmesg | grep parport" says (with BIOS in ECP/EPP mode):

      parport0: PC-Style at 0x378 (0x778), irq 7 (PCSPP, TRISTATE, COMPAT,
    EPP, ECP)
      parport0: cpp_daisy: aa5500ff (38)
      parport0: assign_addrs: aa5500ff (38)
      parport0: cpp_daisy: aa5500ff (38)
      parport0: assign_addrs: aa5500ff (38)

      * in the driver code, it goes something like this:

            port = parport_enumerate( ... ); // and a for loop ... I know
    it's deprecated, next round.
            dev = parport_register_device(port, .... my_interrupt_handler,
    ...);
            parport_enable_irq(port);
            parport_claim(dev)
      
       Then it prints out debug info with following values:

            port->name : parport0
            port->base : 0x378
            port->irq : 7

      The function my_interrupt_handler is currently empty except for one
    line that prints a debug message, but it never shows up.

      One thing I noticed: with the port in BIOS as EPP/ECP, the counter in
    /proc/interrupts goes up by one each time I rmmod and then modprobe of
    parport/parport_pc and my driver.

      I searched Google and the archives, but found nothing that seems
    applicable. One thread in the archives discussed a similar problem with
    ECP interrupts, working on one PC but not on another, seemingly
    identical one, but without final conclusion. Remember, I just want SPP
    nAck, that has been around for something like 20 years ...

      Am I missing something obvious ? Is this supposed to work at all ?

      Pointers to docs, sample code etc would be most welcome.

      Thanks in advance,

      Luc Pardon
      Skopos Consulting
      Belgium

    -- 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 : Tue Apr 02 2002 - 14:13:17 EST