Dominique,

I have struggled with very similar problems for a long time, until
Henning Meier-Geinitz kicked in and brought me the solution...  You will
need to patch the 2.4.x kernel and recompile. Infact, only one single
line need to be changed, see unified diff below.

What I never understood is why this patch never made it into the kernel
(it is known at least as of 2.4.20). Henning is the maintainer for usb
scanners and he is aware of the problem with the Nikon LS40. Could it be
that Henning believes the problem is not with scanner.c but with the
Nikon hardware or with the Vuescan driver for de LS40?

What I also don't understand is why we don't see many more cries for
help like yours and mine. The Nikon LS40 is a popular scanner so many
people should be suffering from the same problem. Apparently they
don't... I saw one similarity between you setup and mine: we both use an
ASUS motherboard for USB, although mine is an A7V266-E with the VIA
VT8233 south bridge to handle USB. Not sure if that has anything to do
with it. I am also using Vuescan, like you do.

Anyway, here is the patch (courtesy of Henning Meier-Geinitz and
extracted from my 2.4.21 kernel). I have not yet tried 2.6.0-preX.

Cheers,
Paul


--- scanner.c   2003-06-13 16:51:36.000000000 +0200
+++ /usr/src/linux-2.4.21/drivers/usb/scanner.c 2003-06-30 20:20:33.000000000 +0200
@@ -723,7 +723,7 @@
                                ret = -EFAULT;
                                break;
                        }
-                       count -= this_read; /* Compensate for short reads */
+                       count -= partial; /* Compensate for short reads */
                        bytes_read += partial; /* Keep tally of what actually was read 
*/
                        buffer += partial;
                } else {



Dominique Deleris wrote:
 > I am a happy customer of VueScan under Linux, using a
 > D660U flatbed scanner. I have just bought a Coolscan IV-ED to scan
 > my negatives with high quality.
 > 
 > I am going crazy with weird timeout problems under Linux. I have
 > followed Vuescan's instructions plus over hints (searched Google quite
 > a lot...) for kernel configuration:
 > 
 > CONFIG_USB_BANDWIDTH=y
 > CONFIG_USB_LONG_TIMEOUT=y
 > CONFIG_USB_UHCI=m
 > CONFIG_USB_UHCI_ALT=m
 > CONFIG_USB_SCANNER=m
 > 
 > I have tried using usb-uhci, or uhci.
 > 
 > I have modified the file
 > ./drivers/usb/usb.c to increase the value of GET_TIMEOUT
 > (http://lists.insecure.org/lists/linux-kernel/2003/Jan/0767.html)
 > 
 > Only one out of ten machine reboots do I get VueScan starting to
 > scan (preview always work...)
 > 
 > Kernel is vanilla 2.4.20 from ftp.kernel.org
 > 
 > Should I use 2.6 kernel?
 > 
 > I get the following error messages:
 > Nov  5 23:18:29 baloo kernel: scanner.c: read_scanner(0): funky result:-75.
 > Consult Documentation/usb/scanner.txt.
 > Nov  5 23:18:39 baloo kernel: usb_control/bulk_msg: timeout
 > Nov  5 23:18:59 baloo kernel: usb_control/bulk_msg: timeout
 > Nov  5 23:19:19 baloo kernel: usb_control/bulk_msg: timeout
 > Nov  5 23:19:59 baloo last message repeated 2 times
 > Nov  5 23:20:59 baloo last message repeated 3 times
 > Nov  5 23:21:59 baloo last message repeated 3 times
 > Nov  5 23:22:19 baloo kernel: usb_control/bulk_msg: timeout
 > Nov  5 23:22:19 baloo kernel: scanner.c: read_scanner(0): excessive NAK's
 > received
 > Nov  5 23:22:19 baloo kernel:  printing eip:
 > Nov  5 23:22:19 baloo kernel: c0112c44
 > Nov  5 23:22:19 baloo kernel: Oops: 0002
 > Nov  5 23:22:19 baloo kernel: CPU:    0
 > Nov  5 23:22:19 baloo kernel: EIP:    0010:[add_wait_queue_exclusive+28/36]
 >    Tainted: P
 > Nov  5 23:22:19 baloo kernel: EFLAGS: 00210082
 > Nov  5 23:22:19 baloo kernel: eax: cff31bf4   ebx: 00000000   ecx: 00200202
 >   edx: c63c1f58
 > Nov  5 23:22:19 baloo kernel: esi: c63c1f50   edi: c63c0000   ebp: cff31b60
 >   esp: c63c1f38
 > Nov  5 23:22:19 baloo kernel: ds: 0018   es: 0018   ss: 0018
 > Nov  5 23:22:19 baloo kernel: Process vuescan (pid: 699, stackpage=c63c1000)
 > Nov  5 23:22:19 baloo kernel: Stack: cff31be8 c63c1f50 c0105a69 00000000
 > c63a5ce0 00000006 00000001 c63c0000
 > Nov  5 23:22:19 baloo kernel:        cff31bf4 00000000 c0105bc8 cff31be8
 > d0a3022c c63a5ce0 d0a30de6 00000000
 > Nov  5 23:22:19 baloo kernel:        c63a5ce0 ffffffea 00000006 cbe00d3c
 > 02001000 00000000 00000000 00000000
 > Nov  5 23:22:19 baloo kernel: Call Trace:    [__down+65/156] [__down_failed+8/12]
 > [3c59x:__insmod_3c59x_O/lib/modules/2.4.20-wacom/kernel/drivers/ne+-118228/96]
 > [3c59x:__insmod_3c59x_O/lib/modules/2.4.20-wacom/kernel/drivers/ne+-115226/96]
 > [sys_write+150/240]
 > Nov  5 23:22:19 baloo kernel:   [system_call+51/56]
 > Nov  5 23:22:19 baloo kernel:
 > Nov  5 23:22:19 baloo kernel: Code: 89 13 51 9d 5b 5e c3 90 56 53 89 d6 9c
 > 5a fa 8d 5e 08 8b 4b
 >  
 > My configuration:
 > 
 > Asus CUV4X (2 + 2 USB ports)
 > 256 Mb RAM
 > SB AWE64 (old stuff)
 > Promise 100TX controller
 > 
 > USB devices :
 > HP deskjet 959c (off)
 > Visor Edge (unplugged)
 > Wacom Volito palette
 > LS-40 :)


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to