[sane-devel] Buslogic problems with 2.4 kernel and sane

Henning Meier-Geinitz henning@meier-geinitz.de
Wed, 3 Apr 2002 18:52:19 +0200


Hi,

On Tue, Apr 02, 2002 at 09:09:11PM -0800, Bruce Forsberg wrote:
> This is an informational message and does not require a reply.

I can't resist replying nevertheless :-) If you are using SANE 1.0.7
or newer, you can ignore my comment.

> 1) At various times the scan will abort almost after it has started
> leaving only a few number of lines.

[...]

> [sanei_scsi] sanei_scsi_req_wait: SCSI command complained: Success
> [sanei_scsi] sense buffer: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [sanei_scsi] target status: 00 host status: 0007 driver status: 0027

I had similar errors with the Mustek backend and a different SCSI
adapter. The problem was that with the SCSI generic driver used in
kernel 2.4.* the buffers sent to the driver aren't copied any more and
so if you use more than one and don't check if they are finished they
are overwritten. The result is an invalid SCSI command. This only
happend with some SCSI controllers and kernel 2.4.

I'm not sure if the Umax backend also does double buffering but the
option you mentioned gives a hint in this direction.

SANE 1.0.7 shouldn't show this behaviour because in sanei_scsi.c the
buffers are now copied again.

> USED NON SMP KERNEL
>   Same problems as above
> USED ADAPTEC PCI 2940
>   Both problems 1 and 2 gone. No problems

This controller (or its driver) has an internal queue and so the
problem doesn't show up here.

> USED 2.2.20 SMP KERNEL
>   Both problems 1 and 2 gone. No problems

Buffers are copied...

> USED 2.4.18 SMP KERNEL
>    Same problems as above
 
 
> It is clear from the above data that there is a problem with the device
> driver in 2.4 kernels for BusLogic SCSI cards. I have emailed the
> original
> author with the data above but since BusLogic cards are not that popular
> I don't know if it will ever be fixed.

I'm not sure about your problem no. 1 but if you used SANE 1.0.6 or
older I'm quite sure that your latter problem is not cause by the
kernel driver.

Bye,
  Henning