Re: Problem with kernel 2.4ac9, ava1505, snapscan1236s, sane1.0.4

From: Erik Inge Bolsų (knan@mo.himolde.no)
Date: Sun Jan 14 2001 - 12:31:19 PST

  • Next message: David Mosberger-Tang: "test"

    On Sun, 14 Jan 2001, Douglas Gilbert wrote:
    >This is interesting. The linux scsi subsystem (as does
    >FreeBSD's CAM) implements "autosense" to get its sense
    >buffer after a command has failed. This means that when
    >a command like "test unit ready" is sent and it returns
    >a "check condition" status code then the subsystem will
    >automatically issue a "request sense" and give its
    >response back as the sense buffer of the original command
    >("test unit ready" in this case).
    >
    >So SANE backends shouldn't be issuing "request sense"
    >commands IMHO. BTW only the first "request sense" gets
    >the error response, so sending more of them is useless.

    Hmm, interesting.

    Did a grep in current sources, and found that 12 out of 30-something
    backends issue request_sense commands currently.

    But a problem is: what about the other OS'es supported by
    SANE? AIX, Unixware, OS/2, HP-UX, Solaris, *BSD ? I expect not all of
    these use the "autosense" method... And that's probably why these backends
    issue request_sense commands.

    So do we need to implement some sort of: (pseudocode following)

      error = do_scsi_command(cmd);
      if ((error < 0) && OS_AUTOSENSE)
         sense = cmd->sense;
      else
         sense = do_scsi_command(request_sense);

    in some generic layer somewhere?

    I'm not familiar with SANE internals, so this might already exist, for all
    I know :)

    >It seems as though a problem that Arnold Schiller has
    >sent me is very similar: a SnapScan1236/aha152x
    >combination that locks up just after a "request sense"
    >is sent to the scanner.

    Sounds like the same problem, indeed.

    --
    Erik I. Bolsų | email: <knan at mo.himolde.no>
    The UNIX philosophy basically involves giving you enough rope to
    hang yourself.  And then a couple of feet more, just to be sure.
    

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



    This archive was generated by hypermail 2b29 : Sun Jan 14 2001 - 11:48:49 PST