# Re: umax_pp_low: ppdev

From: stef (stef-listes@wanadoo.fr)
Date: Wed Jun 06 2001 - 21:47:31 PDT

- Next message: Guru Prasad: "Any Work is done for barcode scanners."
  - Previous message: Christoph Knauer: "Select gray-channel for grey scanns"
  - In reply to: Tim Waugh: "umax_pp_low: ppdev"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  On Wed, Jun 06, 2001 at 09:41:46AM +0100, Tim Waugh wrote:
  > 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.
  > */

  The umax_pp backend has been changed in CVS to use PPGETMODES ioctl.

  Regards,
  Stef

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

  - Next message: Guru Prasad: "Any Work is done for barcode scanners."
  - Previous message: Christoph Knauer: "Select gray-channel for grey scanns"
  - In reply to: Tim Waugh: "umax_pp_low: ppdev"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Wed Jun 06 2001 - 21:37:05 PDT