Re: Help needed with MaxiScan A4 SCSI scanner under Mandrake 7.2

From: abel deuring (a.deuring@satzbau-gmbh.de)
Date: Thu Apr 05 2001 - 06:22:24 PDT

  • Next message: abel deuring: "Re: pers.: Re: Xsane build problems"

    > Ceri Hankey wrote:
    >
    > Hi,
    >
    > I have REAL problem getting my scanner to run under Linux Mandrak
    > 7.2. I have loaded the sane 1.0.4 stuff from
    > the SANE site (the 1.0.3 package with Mandrake produces the results
    > shown below)
    >
    > Everything 'seems' to assemble correctly, but...
    >
    > NB The scanner is connected to the first scsi card found 'atp870u'
    > (correctly)
    > and I have two cards (the second one drives my SCSI disk and a CD
    > Writer, which works fine - at last)...

    Ceri,

    the atp870u driver has a bug which affects many scanners. The driver
    limits the data returned for an INQUIRY command to 36 bytes, but several
    scanners return important information in bytes beyond this limit.

    Stephen Carr and others had success with this path to the driver:

    The function send_s870 in atp870u.c (copied from lk 2.2.13) looks at
    line 507 like this:

    oktosend:
            memcpy(&ata_cdbu[h][0], &workrequ->cmnd[0], workrequ->cmd_len);
            if (ata_cdbu[h][0] == 0x25) {
                    if (workrequ->request_bufflen > 8) {
                            workrequ->request_bufflen = 0x08;
                    }
            }
            if (ata_cdbu[h][0] == 0x12) {
                    if (workrequ->request_bufflen > 0x24) {
                            workrequ->request_bufflen = 0x24;
                            ata_cdbu[h][4] = 0x24;
                    }
            }

    (Other versions of the driver use the macro INQUIRY instead of the
    number 0x12)

    Commenting out the "if (ata_cdbu[h][0] == 0x12)" part should fix the
    problem:

    oktosend:
            memcpy(&ata_cdbu[h][0], &workrequ->cmnd[0], workrequ->cmd_len);
            if (ata_cdbu[h][0] == 0x25) {
                    if (workrequ->request_bufflen > 8) {
                            workrequ->request_bufflen = 0x08;
                    }
            }
    /*
            if (ata_cdbu[h][0] == 0x12) {
                    if (workrequ->request_bufflen > 0x24) {
                            workrequ->request_bufflen = 0x24;
                            ata_cdbu[h][4] = 0x24;
                    }
            }
    */

    I don't know, why there is this limit to 36 bytes for the INQUIRY
    command and so I cannot guarantee that this patch does not introduce
    another error.

    Abel

    --
    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 : Thu Apr 05 2001 - 04:56:10 PDT