abel deuring wrote:
>
> Douglas Gilbert wrote:
>
> > Since (and including) lk 2.2.10 it has been possible for the
> > Canon backend to override the SCSI command length as noted
> > above. The SG_GET_VERSION_NUM ioctl() can be used to find the
> > sg version number. So it is possible for the Canon backend
> > to use these and save the end user from striking these type
> > of problems in recent distributions.
> >
> > So the bug was fixed 9 months ago. IMHO the Canon backend
> > should have picked this up by now.
>
> Douglas,
>
> it is not only a problem of or for the Canon backend, it is also a
> problem of the sanei_scsi-library. With the functions sanei_scsi_cmd and
> sanei_scsi_req_enter, it is not possible to explicitly set the command
> length.
Ouch, that seems like a serious shortcoming. This means all pass
through mechanisms (e.g. sg, cam) have to guess command lengths.
> What would be needed, is either a modified version of these functions
> which has the SCSI command length as an additional parameter, or -
> similar to the way the SG driver works - an additional function that
> sets the length of the next command.
> For compatibility, I would prefer the latter, something like
> sanei_scsi_set_cmd_len(int fd, int len). This should fix the problems of
> the Canon backend for Linux, but I don't know, if or how this can be
> handled for the other operating systems supported by Sane.
Setting the length of the next command is a bit of a hack brought
about by the lack of room for new input values in the sg_header
structure. The new sg_io_hdr interface structure for sg takes the
command length as input.
The backends should know the length of SCSI commands
and could pass that information through to the SANE library. If
they don't (especially for "vendor special" commands) then all
OSes (not just Linux) are going to have problems. The hack that
the Canon page suggests on sg would also be needed in 98 (for
example [if it was supported]) but there the driver is not so
easy to change ...
Perhaps Petter Reinholdtsen needs to get involved with this if
a SANE library interface change (or addition) is needed.
Doug Gilbert
-- 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 : Tue May 02 2000 - 04:49:02 PDT