Re: [snapscan] Vuego 620S and ACARD scsi card

From: abel deuring (a.deuring@satzbau-gmbh.de)
Date: Fri Dec 15 2000 - 05:48:54 PST

  • Next message: Tobias Nijweide: "Re: HP5300C mini HowTo"

    Ben Millhouse wrote:
    >
    > Hello all,
    >
    > I'm at a bit of a loss as to what to do with my Vuego 620S scanner that is
    > running off the bundled ACARD scsi card on my linuux box.
    >
    > After trolling through the mailing list archives, I managed to get sane to
    > recognise my scanner with "scanimage -L" but if I try to do anything
    > more complex it cacks itself with a floating point exception.
    >
    > The output of "scanimage -T" with SANE_DEBUG_SNAPSCAN set to 255
    > can be found at http://www.tygger.net/~wico/snapscan/debug.txt
    >
    > Here's the specifics of my system:
    >
    > Linux kernel 2.0.37
    > sg driver 2.1.39
    > sane 1.0.3
    > snapscan backend 11282000
    > Acer Vuego Scan Brisa 620S
    > ACARD AEC-6710D
    >
    > Anybody have a clue what's going on?

    I guess that you are using the atp870u driver for the Acard adapter.
    This driver clips the data returned for the INQUIRY command to 36 bytes,
    but the Snapscan backend needs more data from this command to work
    properly. Stephen Carr got a similar problem with the atp870u driver and
    a Umax scanner; he could fix it by patching the atp870u 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 : Fri Dec 15 2000 - 04:36:44 PST