Subject: kern/26537: accessing usb memory stick sd0 takes minutes
To: None <gnats-bugs@gnats.NetBSD.org>
From: Hanspeter Roth <hampi@rootshell.be>
List: netbsd-bugs
Date: 08/03/2004 20:08:14
>Number:         26537
>Category:       kern
>Synopsis:       accessing usb memory stick sd0 takes minutes
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 03 18:09:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 2.0_BETA
>Organization:
	
>Environment:
	
	
System: NetBSD snoopy.here 2.0_BETA NetBSD 2.0_BETA (GENERIC) #0: Sat Jul 24 01:18:41 UTC 2004 autobuild@tgm.netbsd.org:/autobuild/netbsd-2-0/i386/OBJ/autobuild/netbsd-2-0/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	Trying to access an USB memory stick by `mount' takes 7'25".

	Plugging the memory stick yields:

umass0 at uhub0 port 1 configuration 1 interface 0
umass0: USB Solid state disk, rev 1.10/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <USB, Flash Drive, 1.11> disk removable

	If the stick is already plugged in during boot the system hangs 
	after the latest message line above.

	After starting `mount /stick' it takes some 3 minutes
	until these lines show up:

sd0: fabricating a geometry
sd0: 64512 KB, 63 cyl, 64 head, 32 sec, 512 bytes/sect x 129024 sectors

	After 7'25" `mount' completes. Another line shows up:
sd0: fabricating a geometry

	Then the filesystem can be accessd.
	
	On the same machine under FreeBSD 4.9 the mount completes quickly.
	Also on a different machine under NetBSD 2Beta the same memory
	stick mounts quickly.

	Dmesg:

NetBSD 2.0_BETA (GENERIC) #0: Sat Jul 24 01:18:41 UTC 2004
	autobuild@tgm.netbsd.org:/autobuild/netbsd-2-0/i386/OBJ/autobuild/netbsd-2-0/src/sys/arch/i386/compile/GENERIC
total memory = 255 MB
avail memory = 242 MB
BIOS32 rev. 0 found at 0xf1890
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: AMD Athlon XP 1800+ (686-class), 1160.39 MHz, id 0x662
cpu0: features c3c3fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features c3c3fbff<PGE,MCA,CMOV,PAT,PSE36,MMXX,MMX>
cpu0: features c3c3fbff<FXSR,SSE,3DNOW2,3DNOW>
cpu0: I-cache 64 KB 64B/line 2-way, D-cache 64 KB 64B/line 2-way
cpu0: L2 cache 256 KB 64B/line 16-way
cpu0: ITLB 16 4 KB entries fully associative, 8 4 MB entries fully associative
cpu0: DTLB 32 4 KB entries fully associative, 8 4 MB entries 4-way
cpu0: 8 page colors
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Silicon Integrated System SiS 745 Host Bridge (rev. 0x01)
agp0 at pchb0: aperture at 0xf0000000, size 0x4000000
ppb0 at pci0 dev 1 function 0: Silicon Integrated System 86C201 (rev. 0x00)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga1 at pci1 dev 0 function 0: ATI Technologies product 0x5446 (rev. 0x00)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
pcib0 at pci0 dev 2 function 0
pcib0: Silicon Integrated System product 0x0018 (rev. 0x00)
ohci0 at pci0 dev 2 function 2: Silicon Integrated System 5597/5598 USB host controller (rev. 0x07)
ohci0: interrupting at irq 9
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Silicon Integra OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
ohci1 at pci0 dev 2 function 3: Silicon Integrated System 5597/5598 USB host controller (rev. 0x07)
ohci1: interrupting at irq 9
ohci1: OHCI version 1.0, legacy support
usb1 at ohci1: USB revision 1.0
uhub1 at usb1
uhub1: Silicon Integra OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 3 ports with 3 removable, self powered
siside0 at pci0 dev 2 function 5
siside0: Silicon Integrated System 745 IDE controller (rev. 0xd0)
siside0: bus-master DMA support present
siside0: primary channel wired to compatibility mode
siside0: primary channel interrupting at irq 14
atabus0 at siside0 channel 0
siside0: secondary channel wired to compatibility mode
siside0: secondary channel interrupting at irq 15
atabus1 at siside0 channel 1
eap0 at pci0 dev 9 function 0: Ensoniq AudioPCI 97 ES1373-B (rev. 0x06)
eap0: interrupting at irq 10
eap0: ac97: TriTech TR28028 codec; 18 bit DAC, 18 bit ADC, no 3D stereo
eap0: ac97: ext id 280<AMAP,SDAC>
audio0 at eap0: full duplex, mmap, independent
midi0 at eap0: AudioPCI MIDI UART
cmdide0 at pci0 dev 10 function 0
cmdide0: Silicon Image 0680 (rev. 0x02)
cmdide0: bus-master DMA support present
cmdide0: primary channel configured to native-PCI mode
cmdide0: using irq 5 for native-PCI interrupt
atabus2 at cmdide0 channel 0
cmdide0: secondary channel configured to native-PCI mode
atabus3 at cmdide0 channel 1
AVM Fritz!PCI v2.0 ISDN Interface (miscellaneous network, revision 0x01) at pci0 dev 11 function 0 not configured
cmdide1 at pci0 dev 12 function 0
cmdide1: Silicon Image 0680 (rev. 0x02)
cmdide1: bus-master DMA support present
cmdide1: primary channel configured to native-PCI mode
cmdide1: using irq 9 for native-PCI interrupt
atabus4 at cmdide1 channel 0
cmdide1: secondary channel configured to native-PCI mode
atabus5 at cmdide1 channel 1
isa0 at pcib0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi1 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
isapnp0: no ISA Plug 'n Play devices found
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
Kernelized RAIDframe activated
wd0 at atabus0 drive 0: <ST3160023A>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 149 GB, 310101 cyl, 16 head, 63 sec, 512 bytes/sect x 312581808 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd1 at atabus0 drive 1: <ST340014A>
wd1: drive supports 16-sector PIO transfers, LBA48 addressing
wd1: 38166 MB, 77545 cyl, 16 head, 63 sec, 512 bytes/sect x 78165360 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(siside0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA data transfers)
wd1(siside0:0:1): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA data transfers)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <Memorex SixteenMAXX 1040, , TWS1> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2
cd0(siside0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
atapibus1 at atabus2: 2 targets
cd1 at atapibus1 drive 0: <PLEXTOR CD-R   PX-W4012A, 563001, 1.02> cdrom removable
cd1: 32-bit data port
cd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd1(cmdide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
atapibus2 at atabus3: 2 targets
cd2 at atapibus2 drive 0: <HL-DT-ST GCE-8525B, , 1.01> cdrom removable
cd2: 32-bit data port
cd2: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd2(cmdide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
atapibus3 at atabus4: 2 targets
cd3 at atapibus3 drive 0: <PLEXTOR CD-R   PX-W4012A, 321912, 1.02> cdrom removable
cd3: 32-bit data port
cd3: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd3(cmdide1:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
atapibus4 at atabus5: 2 targets
cd4 at atapibus4 drive 0: <PLEXTOR CD-R   PX-W4012A, 321911, 1.02> cdrom removable
cd4: 32-bit data port
cd4: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd4(cmdide1:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
wsdisplay0: screen 5 added (80x25, vt100 emulation)
wsdisplay0: screen 6 added (80x25, vt100 emulation)

>How-To-Repeat:
	
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted: