Hi,
I'm having problems with a Nikon LS-40 (Coolscan IV) slidescanner (2900
dpi). I expect that the datarate for a 2900dpi scanner is pretty fresh.
I'm using Vuescan, a shareware program, myself, but the same experiences
have been had with SANE tools. I have included kernel and hardware info
at the bottom of this mail.
With the uhci module it's completely unstable, and it usualy hands less
than 2 seconds after starting a lowres preview scan. Dmesg shows this:
uhci.c: USB UHCI at I/O 0xd000, IRQ 12
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver usbscanner
scanner.c: 0.4.6:USB Scanner Driver
hub.c: USB new device connect on bus1/1, assigned device number 2
scanner.c: probe_scanner: User specified USB scanner -- Vendor:Product -
4b0:400
0
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
With usb-uhci it's more stable: As long as the machine is fairly idle,
there a lot of free memory/low memory pressure it will work and work.
Keeping it stable requires running
perl -e '$foo = "f"x(1024*1024*512);'
now and again to keep the "free" memory plentiful. Once I start lame
with the CPU consuption and IO it will crash fairly soon. This, to me,
points to a memory or CPU pressure related race condition. Vuescan used
to just do malloc of it's buffer memory, and then do the USB read. Now
it does malloc and then memset. This should result in the memory being
mapped afterwards. This is much more stable, but lame is still able to
crash it quite quickly. When it crashes this is what I find in dmesg
(and this was not chanced by the memset):
usb-uhci.c: interrupt, status 3, frame# 1343
scanner.c: read_scanner(0): funky result:-75. Consult
Documentation/usb/scanner.txt.
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
usb_control/bulk_msg: timeout
scanner.c: write_scanner: NAK received.
To me it appears that unmapped memory regions that takes too long to map
is the likely cause of this problem. If the USB stack was to mlock the
buffer pages this might help. Having the application do mlock is a bit
ugly since it requires root. Using static bounce buffers would also
help, but make everything a great deal slower.
Is there anything I can do to test or debug this?
The problem can _usualy_ be worked-around by killing the app and
unloading the usb-uhci module, turning the scanner off and on and then
reloading the usb-uhci module.
There is another problem in this situation too. The scanner module's
reference count< never goes back to 0, even if the application is dead
and gone.
People running SuSE have also reported that their Linux machines are
unstable with this scanner. I do not have access to any non uhci usb
hardware.
Kernel and hardware information:
# cat /proc/version
Linux version 2.4.18 (root@roke) (gcc version 2.96 20000731 (Red Hat
Linux 7.1 2.96-98)) #1 Mon Apr 8 21:20:36 CEST 2002
# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Celeron (Coppermine)
stepping : 3
cpu MHz : 634.799
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca
cmov pat pse36 mmx fxsr sse
bogomips : 1264.84
# cat /proc/modules
scanner 8576 0
usb-uhci 21348 0 (unused)
usbcore 48736 1 [scanner usb-uhci]
binfmt_misc 5700 1
ide-scsi 7616 0
wvlan_cs 24256 1
ds 6496 2 [wvlan_cs]
i82365 21840 2
pcmcia_core 46656 0 [wvlan_cs ds i82365]
serial 44992 1 (autoclean)
# cat /proc/ioports
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0070-007f : rtc
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
0100-013f : wvlan_cs
0170-0177 : ide1
01f0-01f7 : ide0
02f8-02ff : serial(auto)
0376-0376 : ide1
03c0-03df : vga+
03e2-03e3 : i82365
03f6-03f6 : ide0
03f8-03ff : serial(auto)
0cf8-0cff : PCI conf1
b800-b8ff : LSI Logic / Symbios Logic (formerly NCR) 53c810
b800-b87f : ncr53c8xx
d000-d01f : VIA Technologies, Inc. UHCI USB (#2)
d000-d01f : usb-uhci
d400-d41f : VIA Technologies, Inc. UHCI USB
d400-d41f : usb-uhci
d800-d80f : VIA Technologies, Inc. Bus Master IDE
d800-d807 : ide0
d808-d80f : ide1
e400-e4ff : VIA Technologies, Inc. VT82C686 [Apollo Super ACPI]
e800-e80f : VIA Technologies, Inc. VT82C686 [Apollo Super ACPI]
# cat /proc/iomem
00000000-0009ffff : System RAM
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000c9000-000cbfff : pnp 09
000d4000-000d4fff : card services
000e8000-000effff : pnp 09
000f0000-000fffff : System ROM
00100000-47febfff : System RAM
00100000-001ff4b1 : Kernel code
001ff4b2-0024bdbf : Kernel data
47fec000-47feefff : ACPI Tables
47fef000-47ffefff : reserved
47fff000-47ffffff : ACPI Non-volatile Storage
f4000000-f40000ff : LSI Logic / Symbios Logic (formerly NCR) 53c810
f4800000-f5efffff : PCI Bus #01
f4800000-f4ffffff : Matrox Graphics, Inc. MGA G550 AGP
f5000000-f5003fff : Matrox Graphics, Inc. MGA G550 AGP
f5f00000-f7ffffff : PCI Bus #01
f6000000-f7ffffff : Matrox Graphics, Inc. MGA G550 AGP
f8000000-fbffffff : VIA Technologies, Inc. VT8605 [ProSavage PM133]
ffff0000-ffffffff : reserved
# /sbin/lspci -vvv
00:00.0 Host bridge: VIA Technologies, Inc. VT8605 [ProSavage PM133]
(rev 81)
Subsystem: Asustek Computer, Inc.: Unknown device 802c
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort+ >SERR- <PERR-
Latency: 0
Region 0: Memory at f8000000 (32-bit, prefetchable) [size=64M]
Capabilities: [a0] AGP version 2.0
Status: RQ=31 SBA+ 64bit- FW- Rate=x1,x2
Command: RQ=0 SBA- AGP- 64bit- FW- Rate=<none>
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:01.0 PCI bridge: VIA Technologies, Inc. VT8605 [PM133 AGP] (prog-if
00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort+ >SERR- <PERR+
Latency: 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 0000e000-0000dfff
Memory behind bridge: f4800000-f5efffff
Prefetchable memory behind bridge: f5f00000-f7ffffff
BridgeCtl: Parity- SERR- NoISA- VGA+ MAbort- >Reset- FastB2B-
Capabilities: [80] Power Management version 2
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:04.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South]
(rev 22)
Subsystem: Asustek Computer, Inc.: Unknown device 802c
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping+ SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 0
00:04.1 IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 10)
(prog-if 8a [Master SecP PriP])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping+ SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 32
Region 4: I/O ports at d800 [size=16]
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:04.2 USB Controller: VIA Technologies, Inc. UHCI USB (rev 10)
(prog-if 00 [UHCI])
Subsystem: Unknown device 0925:1234
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 32, cache line size 08
Interrupt: pin D routed to IRQ 12
Region 4: I/O ports at d400 [size=32]
Capabilities: [80] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:04.3 USB Controller: VIA Technologies, Inc. UHCI USB (rev 10)
(prog-if 00 [UHCI])
Subsystem: Unknown device 0925:1234
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 32, cache line size 08
Interrupt: pin D routed to IRQ 12
Region 4: I/O ports at d000 [size=32]
Capabilities: [80] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:04.4 Host bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI]
(rev 30)
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Capabilities: [68] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00:0e.0 SCSI storage controller: Symbios Logic Inc. (formerly NCR)
53c810 (rev 02)
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Interrupt: pin A routed to IRQ 10
Region 0: I/O ports at b800 [size=256]
Region 1: Memory at f4000000 (32-bit, non-prefetchable)
[size=256]
01:00.0 VGA compatible controller: Matrox Graphics, Inc.: Unknown device
2527 (rev 01) (prog-if 00 [VGA])
Subsystem: Matrox Graphics, Inc.: Unknown device 0f84
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (4000ns min, 8000ns max), cache line size 08
Interrupt: pin A routed to IRQ 11
Region 0: Memory at f6000000 (32-bit, prefetchable) [size=32M]
Region 1: Memory at f5000000 (32-bit, non-prefetchable)
[size=16K]
Region 2: Memory at f4800000 (32-bit, non-prefetchable)
[size=8M]
Expansion ROM at f5fe0000 [disabled] [size=128K]
Capabilities: [dc] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [f0] AGP version 2.0
Status: RQ=31 SBA+ 64bit- FW- Rate=x1,x2
Command: RQ=31 SBA+ AGP+ 64bit- FW- Rate=x1
Nicolai
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users