Re: reaction to a smaller buffer size

From: Oliver Neukum (Oliver.Neukum@lrz.uni-muenchen.de)
Date: Sun Nov 19 2000 - 10:07:10 PST

  • Next message: abel deuring: "Re: reaction to a smaller buffer size"

    > The problem is that a backend may consider sanei_scsi_max_request_size
    > as a constant. This was true for the old Linux SG driver; but with the
    > new SG driver it is at least in theory possible that you get different
    > buffer sizes each time a SG device file is opened. (Not very likely, but
    > it is possible)

    It's virtually certain if you have two host adapters, whose drivers differ
    in their ability to do scatter/gather. This means that SANE will always
    fail in that setup.

    > Both situations might have caused unnecessary work and headaches for
    > backend developers, who don't need or don't want to switch to
    > sanei_scsi_open_extended, and therefore I decided to use this "paranoid"
    > looking "if (real_buffersize != wanted_buffersize)", when I introduced
    > sane_scsi_open_extended and related stuff.

    I see, but in the case I mentioned above the user needs to limit the
    buffer by setting enviromental variables.

    > > Why don't you use sanei_scsi_open_extended if it is available for your
    > > paltform? In this case the backend can try to get a big buffer and
    > > knows the actual size it is allowed to use.

    I am using an existing backend (microtek2). It works with this check removed.
    Is converting a backend to use sanei_scsi_open_extended difficult ?

            Regards
                    Oliver

    --
    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 Nov 19 2000 - 09:52:39 PST