Re: SG_BIG_BUFF setting in Problems incorrect

From: abel deuring (a.deuring@satzbau-gmbh.de)
Date: Fri Feb 04 2000 - 03:41:45 PST

  • Next message: abel deuring: "Re: fork or pthread for async I/O?"

    Bill Wohler wrote:
    >
    > I just installed DEVEL_1_9 from the CVS repository and couldn't get
    > to my scanner (HP Photosmart SCSI, running under a Linux 2.2.1
    > kernel).
    >
    > Thanks to the debugging output, the problem was clear:
    >
    > [wohler@gbr:587]% SANE_DEBUG_SANEI_SCSI=128 SANE_DEBUG_HP=128 scanimage
    > ...
    > [sanei_scsi] sanei_scsi_open: could not allocate SG buffer memory wanted: 131072 got: 32768
    >
    > The sane-scsi manpage suggested bumping SG_BIG_BUFF in
    > /usr/src/linux/include/scsi/sg.h to 128*1024-512=130560 bytes, but
    > this doesn't work. After bumping SG_BIG_BUFF to 128*1024=131072
    > bytes, recompiling the kernel, rebooting, and recompiling sane, all
    > was well (phew!). I would suggest updating the sane-scsi man page
    > with the correct value to save others from an extra kernel compiling
    > step.

    That's my fault: In the recent version, sanei_scsi_open calls
    sanei_scsi_open_extended, which allows variable buffer sizes for recent
    kernels. For older kernels, a fixes buffer size of SCSIBUFFERSIZE (= 128
    * 1024) is used. And that cannot work, because SG_BIG_BUFF is by default
    set to 128 * 1024 - 512. I'll fix that this eveing. (Sorry, I can't do
    that right now at work)

    And updating the man page is indeed a good idea...

    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 Feb 04 2000 - 03:54:47 PST