USB2 PCMCIA -> USB Storage with FFS Partition Bug

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

USB2 PCMCIA -> USB Storage with FFS Partition Bug

René Maroufi
Hi,

(first sorry for my bad english, I'm german).

I have a i386 notebook running OpenBSD 3.9 stable. The notebook (IBM
Thinkpad X24) have only USB 1 Ports, so I bought a USB 2 PCMCIA Card.
This Card works in OpenBSD, but with some strange bugs.

dmesg with plugged card and a USB Harddrive:

ohci0 at cardbus0 dev 0 function 0: irq 11, version 1.0
usb3 at ohci0: USB revision 1.0
uhub3 at usb3
uhub3: NEC OHCI root hub, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
ohci1 at cardbus0 dev 0 function 1: irq 11, version 1.0
usb4 at ohci1: USB revision 1.0
uhub4 at usb4
uhub4: NEC OHCI root hub, rev 1.00/1.00, addr 1
uhub4: 1 port with 1 removable, self powered
ehci0 at cardbus0 dev 0 function 2: "NEC USB" rev 0x04 (rev. 0x04)
ehci0: interrupting at 11
usb5 at ehci0: USB revision 2.0
uhub5 at usb5
uhub5: NEC EHCI root hub, rev 2.00/1.00, addr 1
uhub5: 3 ports with 3 removable, self powered
umass0 at uhub5 port 1 configuration 1 interface 0
umass0: Genesys Logic USB TO IDE, rev 2.00/0.33, addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets
sd0 at scsibus1 targ 1 lun 0: <SAMSUNG, MP0402H, 0811> SCSI0 0/direct fixed
sd0: 38154MB, 38154 cyl, 64 head, 32 sec, 512 bytes/sec, 78140160 sec total

disklabel sd0:

# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: MP0402H
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 38154
total sectors: 78140160
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#             size        offset  fstype [fsize bsize  cpg]
  a:      19544064      58595328  4.2BSD   2048 16384  323 # Cyl 28611 -
38153
  c:      78140160             0  unused      0     0      # Cyl     0 -
38154*
  i:      58595296            32  ext2fs                   # Cyl     0*-
28610

There is a linux and a OpenBSD Partition on the Harddrive.

If I mount the Linux Partition (or a MSDOS Fat-Partition from a
USB-Stick) everything works fine. If I mount the FFS OpenBSD Partition
mount hangs and nothing happen any more. kill -9 on the pid of the mount
command doesn't work. If I reboot, on the shutdown the system crashes
with a deadlock:

syncing disks... panic: vclean: deadlock
Stopped at Debugger+0x4: leave

and show a ddb prompt:

trace:

Debugger(d6fb2980,e7b9c700,2,d6efc09c,d6e2617c) at Debugger+0x4
panic(d051d3bf,0,d6e2617c,2,450663fc) at panic+0x63
vclean(d6efc09c,0,d6e2617c,0,0) at vclean+0x11e
vflush_vnode(d6efc09c,e86dfde8,0,1) at vflush_vnode+0x6a
vfs_mount_foreach_vnode(d11d2600,d02426fc,e86dfde8,d02493c2) at
vfs_mount_foreach_vnode+0x2b
vflush(d11d2600,0,2,2) at vflush+0x2a
ffs_flushfiles(d11d2600,2,d6e2617c,d11d2600,0) at ffs_flushfiles+0x4d
ffs_unmount(d11d2600,80000,d6e2617c,0,d11d261c) at ffs_unmount+0x135
dounmount(d11d2600,80000,d6e2617c,0) at dounmount+0x64
vfs_unmountall(d05e1ac0,0,0,0) at vfs_unmountall+0x8f
vfs_shutdown(e86dff68,d6e2617c,e86dff10,d0220cda,0) at vfs_shutdown+0x70
boot(0,0,450663d9,0,d05a5898) at boot+0x15a
sys_reboot(d6e2617c,e86dff68,e86dff58,ffffffff,2d) at sys_reboot+0x26
syscall() at syscall+0x2ea
--- syscall (number 55) ---
0x1c000995:

ps:

PID PPID PGRP UID S FLAGS WAIT COMMAND
*19359 1 19359 0 7 0x4006 reboot
15005 1 10787 0 3 0x4006 biowait mount_ffs
7196 0 0 0 3 0x100204 vinvalbuf usb5
5662 0 0 0 3 0x100204 usbevt usb4
12343 0 0 0 3 0x100204 usbevt usb3
16 0 0 0 3 0x100204 crypto_wa crypto

...(if you need all of the processes I can send you, but I type no more
here because I must read it from screen and write it on a other
Computer, I do this since half an hour)

If I mount the FFS partition from the USB-Harddrive on an internal USB 1
port it worked, but a harddrive on an USB 1 port is not useful (to slow).

The bug must be with the USB-PCMCIA Card. If that helps, I can donate a
card to a developer.

Greetings
Reni Maroufi
--
Reni Maroufi
[hidden email]