[sane-devel] Restrictions to NIASH backend

Ullrich Sigwanz us@bernafon.ch
Tue, 17 Aug 2004 16:32:22 +0200

Hello Julien,

Starting from kernel 2.6.0 the kernel-code in 
drivers/usb/core/meassage.c was changed in a way that
when reading strings from the interface, the first byte of the 
string was assumed to hold the string length descriptor.

This solved several problems with "newer" devices that "chocked" on 
not checking the length descriptor and reading the max. length of 255
(as done in the older 2.4 kernels).

Unfortunately some older devices 
(as the NIASH00019 chips in the Scan Jets 3400c and 4300c are)
did not only choke but access to those devices was 
denied completely.

There is a known "dirty hot fix" for the file  
which changes a statement (the only one in the whole file that reads so)

  len = tbuf[0];


  len = tbuf[0] = 255;

I personally use this fix from kernel 2.6.3 on, which always led to
the wanted success (but let the newer devices probably choke again).

>From kernel 2.6.8 on, the mentioned dirty hot fix is no longer necessary
and the kernel code handles the string length descriptor in a very 
sophisticated way.



-----Original Message-----
From: Julien BLACHE [mailto:jb@jblache.org]
Sent: Dienstag, 17. August 2004 16:08
To: Ullrich Sigwanz
Cc: 'sane-devel@lists.alioth.debian.org'
Subject: Re: [sane-devel] Restrictions to NIASH backend

Ullrich Sigwanz <us@bernafon.ch> wrote:

> May be it is worth mentioning (maybe in the scanners' "Comment"-column), 
> that the scanners HP ScanJet 3400c and HP ScanJet 4300c 
> will *** not *** work with kernels 2.6.0 ... 2.6.7

Could you give some more details ?


Julien BLACHE                                   <http://www.jblache.org> 
<jb@jblache.org>                                  GPG KeyID 0xF5D65169