Subject: kern/19326: Olympus C-5050 can crash umass(4)
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthias Scheler <tron@colwyn.zhadum.de>
List: netbsd-bugs
Date: 12/08/2002 13:43:09
>Number:         19326
>Category:       kern
>Synopsis:       Olympus C-5050 can crash umass(4)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 08 04:44:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6K (2002-12-08 sources)
>Organization:
Matthias Scheler                                  http://scheler.de/~matthias/
>Environment:
System: NetBSD lyssa.zhadum.de 1.6K NetBSD 1.6K (LYSSA) #0: Sun Dec 8 11:45:33 CET 2002 tron@lyssa.zhadum.de:/src/sys/compile/LYSSA i386
Architecture: i386
Machine: i386
>Description:
Connecting an Olympus C-5050 to a NetBSD system works fine most of the time:

umass0 at uhub2 port 1 configuration 1 interface 0
umass0: OLYMPUS C5050Z, rev 1.10/1.00, addr 3
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, 1 lun per target
scsibus1: waiting 2 seconds for devices to settle...
sd0 at scsibus1 target 1 lun 0: <OLYMPUS, C5050Z, 1.00> disk removable
sd0: could not mode sense (4/5); using fictitious geometry
sd0: 32000 KB, 31 cyl, 64 head, 32 sec, 512 bytes/sect x 64000 sectors
sd0: could not mode sense (4/5); using fictitious geometry
sd0: no disk label

However sometimes (about every 10th time) NetBSD gets stuck while
attaching the devices:

umass0 at uhub2 port 1 configuration 1 interface 0
umass0: OLYMPUS C5050Z, rev 1.10/1.00, addr 3
umass0: using SCSI over Bulk-Only

The memory card in the camera can of course not be accessed in this case
because no sd(4) disk was attached. Even worse if you remove the camera
the system crashes. Here's what "gdb" found out from the crash dump:

panic: trap
#0  0x1 in ?? ()
(gdb) where
#0  0x1 in ?? ()
#1  0xc02c910e in cpu_reboot ()
#2  0xc025869f in panic ()
#3  0xc02d0a1e in trap ()
#4  0xc0102c38 in calltrap ()
#5  0xc0330f52 in usbd_abort_pipe ()
#6  0xc03402b4 in umass_detach ()
#7  0xc0253753 in config_detach ()
#8  0xc0333f07 in usb_disconnect_port ()
#9  0xc0334589 in uhub_explore ()
#10 0xc03346ca in uhub_explore ()
#11 0xc0330358 in usb_discover ()
#12 0xc032fc3d in usb_event_thread ()

In case it matters here the attachment messages for the USB hostadapter ...

uhci0 at pci0 dev 31 function 2: Intel 82801BA USB Controller (rev. 0x05)
uhci0: interrupting at irq 10
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered

... and the hub:

uhub2 at uhub0 port 1
uhub2: Texas Instruments TUSB2046 hub, class 9/0, rev 1.10/1.25, addr 2
uhub2: 4 ports with 4 removable, self powered

>How-To-Repeat:
Connect Olympus C-5050 and check the kernel messages afterwards. If
umass(4) gets stuck before attaching a sd(4) disk unconnect the camera
and the system will panic.

>Fix:
Not known.

>Release-Note:
>Audit-Trail:
>Unformatted: