Re: [PARPORT] Troubleshooting a very simple setup

From: Gunther Mayer (gunther.mayer@braunschweig.okersurf.de)
Date: Sun Jun 18 2000 - 15:00:31 EDT

  • Next message: Gunther Mayer: "[PARPORT] Patch-2.4.0test1: change_mode return values"

    Steinar Bang wrote:

    > I am trying to get a Digital PC 5510, running SuSE 6.2 (kernel 2.2.10),
    > connected to a Canon Bjc-4200 through the built-in parallell port

    > /var/log/messages have the following messages about the parport, which
    > is the only messages I have about the parport, and came into the log
    > at the same point as I first tried to define the printer in YaST:
    > Jun 18 13:12:11 doohan kernel: 0x378: CTR: wrote 0x0c, read 0xff
    > Jun 18 13:12:11 doohan kernel: 0x378: DATA: wrote 0xaa, read 0xff
    > Jun 18 13:12:11 doohan kernel: parport0: PC-style at 0x378 [SPP,PS2]
    > Jun 18 13:12:11 doohan kernel: parport0: no IEEE-1284 device present.
    > Jun 18 13:12:11 doohan kernel: lp0: using parport0 (polling).
    >

    Probably your parallel port is not at 0x378.

    If you provide io=0x378 in /etc/conf.modules (or /etc/modules.conf or elsewhere)
    the autodetection is disabled and parport trusts you blindly !
    Non-existant ISA ports read back as 0xff (see CTR and DATA above).

    Tim, should parport_pc contain better warnings (patch appended)?

    Does anybody have some parallel port, that works despite these warnings?

    Regards, Gunther


    --- linux/drivers/misc/parport_pc.c-orig-2.2.15 Sun Jun 18 20:17:27 2000
    +++ linux/drivers/misc/parport_pc.c Sun Jun 18 20:41:28 2000
    @@ -353,6 +353,12 @@
     
     /*
      * Checks for port existence, all ports support SPP MODE
    + * Returns:
    + * 0 : No parallel port at this adress
    + * PARPORT_MODE_PCSPP : SPP port detected
    + * (if the user specified an ioport himself,
    + * this shall always be the case!)
    + *
      */
     static int parport_SPP_supported(struct parport *pb)
     {
    @@ -387,7 +393,7 @@
             if (user_specified)
                     /* That didn't work, but the user thinks there's a
                      * port here. */
    - printk (KERN_DEBUG "0x%lx: CTR: wrote 0x%02x, read 0x%02x\n",
    + printk (KERN_DEBUG "parport 0x%lx (WARNING): CTR: wrote 0x%02x, read 0x%02x\n",
                             pb->base, w, r);
     
             /* Try the data register. The data lines aren't tri-stated at
    @@ -403,11 +409,14 @@
                             return PARPORT_MODE_PCSPP;
             }
     
    - if (user_specified)
    + if (user_specified) {
                     /* Didn't work with 0xaa, but the user is convinced
                      * this is the place. */
    - printk (KERN_DEBUG "0x%lx: DATA: wrote 0x%02x, read 0x%02x\n",
    + printk (KERN_DEBUG "parport 0x%lx (WARNING): DATA: wrote 0x%02x, read 0x%02x\n",
                             pb->base, w, r);
    + printk (KERN_DEBUG "parport 0x%lx: You gave this address, but here is %s "
    + "no parallel port!\n", pb->base, r==0xff ? "surely" : "probably");
    + }
     
             /* It's possible that we can't read the control register or
                the data register. In that case just believe the user. */

    -- 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 Jun 18 2000 - 15:06:44 EDT