[sane-devel] Re: Nikon Coolscan IV and scanner.c funky result -75

Major A andras@users.sourceforge.net
Tue, 17 Jun 2003 22:26:08 +0100

> I'll try to summarize the problem (copied from a mail to
> linux-usb-users):
> | We want to read 42448 bytes (e.g. two scan lines). The buffer size is
> | 32768 so that's the maximum we can do in one turn. The scanner returns
> | only 21224 bytes (probably one scan line). So far that's ok.
> | 
> | The reason is that the next read reads only 9680 bytes instead of
> | 21224. The scanner doesn't seem to be able to handle this.
> So the scanner doesn't seem to like reads different from the size of
> one scan line (?). I gueess the backend shouldn't try to read more
> than the scanner is able to return.

Ah, OK, but Coolscan2 strictly tries to read one scanline at the
time. On the LS-40, this is a maximum of 23328 bytes (2916 pixels, 4
channels each, 2 bytes per channel), which is less than 32k.

> They are able to use libusb. If the scanner driver is loaded, it will
> be used.

OK, in that case please make sure the scanner module isn't loaded.

> The Nikon Coolscan 4 seems to be the only scanner with this problem.
> At least that's the only one I ever got reports for. So I really think
> it's either a scanner or backend problem.

Hmmm, that would be me... the scanner is a bit silly in the way that
it tunnels SCSI commands across USB in a proprietary way, but it seems
to work great in most cases, so it's probably not a hardware fault.

> > Unfortunately, as I said above, this is not a guarantee that the USB
> > system works all right. I've been using the VIA USB 2.0 controller on
> > my mainboard for months now without any trouble, but the moment I
> > connected an external USB 2.0 hard disk to it, things started going
> > very wrong. The solution is still outstanding, the USB team are
> > working on it...
> I've heard similar reports and they seem to be fixed with 2.4.21. But
> your milage may vary...

No, not mine -- in fact, 2.4.20 nearly works, 2.4.21 is totally
broken. With a different card, 2.4.21 works just fine...

> By the way: The problem with coolscan/kernel scanner driver seems to
> happen (have happened?) also with vuescan. Looks like a similar
> scanning routine is used.

That's right. VueScan also uses (used?) the scanner module, so go


Major Andras
    e-mail: andras@users.sourceforge.net
    www:    http://andras.webhop.org/