# umax_pp_low: ppdev

From: Tim Waugh (twaugh@redhat.com)
Date: Wed Jun 06 2001 - 01:41:46 PDT

- Next message: Henning Meier-Geinitz: "Re: size of xcam (was Re: Compiling on OS/2)"
  - Previous message: Stefan Nilsen: "HP Scanjet 2200C (USB) - Any info?"
  - Next in thread: stef: "Re: umax_pp_low: ppdev"
  - Reply: stef: "Re: umax_pp_low: ppdev"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  In umax_pp_low, the following code is wrong:

  /* me check if parport is does ECP */
  mode = IEEE1284_MODE_ECP;
  if (ioctl (fd, PPSETMODE, &mode))
  {
  DBG (16, "umax_pp: port '%s' hasn't ECP\n", parport_name);
  }

  That isn't checking what the port can do at all, but what the driver
  will let you do. The successful PPSETMODE just means that the next
  write() you do will cause the driver to write the data out using ECP.

  The only circumstance under which it might fail really is that

  (a) the port doesn't have hardware ECP support, _AND_
  (b) the kernel's IEEE 1284 implementation wasn't configured when you
  built it

  Then:

  /* we try to set EPP 1.7 first */
  mode = IEEE1284_MODE_EPPSL;
  if (ioctl (fd, PPSETMODE, &mode))

  The comment is wrong.

  If you want to find out what the _hardware_ can do, you want to use
  the PPGETMODES ioctl (and treat errors as 'not telling you').

  Tim.
  */

  - application/pgp-signature attachment: stored

      --
      Source code, list archive, and docs: http://www.mostang.com/sane/
      To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

  - Next message: Henning Meier-Geinitz: "Re: size of xcam (was Re: Compiling on OS/2)"
  - Previous message: Stefan Nilsen: "HP Scanjet 2200C (USB) - Any info?"
  - Next in thread: stef: "Re: umax_pp_low: ppdev"
  - Reply: stef: "Re: umax_pp_low: ppdev"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Wed Jun 06 2001 - 01:41:08 PDT