[sane-devel] 'scanimage -L' fails first time with modular SCSI drivers

Tim Waugh twaugh at redhat.com
Mon Feb 25 15:34:16 GMT 2002


On Sun, Feb 24, 2002 at 02:38:25PM +0100, Henning Meier-Geinitz wrote:

> On Fri, Feb 22, 2002 at 02:02:14PM +0000, Tim Waugh wrote:
> > Could we add some hook to try to get the modules loaded if
> > /proc/scsi/scsi doesn't exist?  Just opening a generic SCSI device is
> > enough to load them.
> 
> Is anybody against the following patch?

Perhaps I should have tested my theory first, before suggesting it.
I've tried this patch, and it does exactly as advertised (the modules
are now loaded and /proc/scsi/scsi contains useful information when
read), but for some reason it doesn't fix the problem.

It still fails the first time, and succeeds the next.  The output of
'strace -eopen,read,ioctl scanimage -L' differs between the first and
second times only in two respects:

a) the first contains some open() retries for /dev/sg0, since the
   modules are being loaded (this is expected);
b) the information read from /dev/sg0 is different.

I can't quite figure out why this is happening.  Perhaps it's a timing
thing, but I tried putting a 10-second sleep as a post-install for the
sg module, and it made no difference.

Besides this, I think that the patch is good. ;-)  It is a necessary
hook I think.  As Oliver said though, perhaps it should be a list.

Tim.
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20020225/5637e666/attachment.sig>


More information about the sane-devel mailing list