Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

USB memory stick

From: Waldemar Brodkorb <wbx(at)luusa.org>
Date: Wed Jan 22 2003 - 05:25:38 EST


Hello,

I have problems with using some USB memory sticks/tokens with OpenBSD. I tried my ibook and workstation (i386) and two different sticks, but they both didn't work as expected.
(16 MB fujitsi/siemens, 128 MB apacer)

Dmesg from my workstation is attached. (I've tried 3.2-stable and 3.2-current without success)

The kernel does not recognize the device geometry correctly.

sd2: 1066MB, 500 cyl, 4 head, 16 sec, 34820 bytes/sec, 32000 sec total

It's only a 16 MB stick. When I try to access the device with disklabel or fdisk, the process halts for some minutes in the moment the device is acessed.

A friend of mine have another 128 MB stick in his notebook
(OpenBSD 3.2-stable), but his token is recognized correctly and
is working fine, dmesg snippet:
 umass0 at uhub0 port 2 configuration 1 interface 0  umass0: Leading Driver USB Mass Storage Device, rev, addr 2  umass0: using SCSI over BBB-P
 scsibus1 at umass0: 2 targets
 sd0 at scsibus1 targ 1 lun 0: <, Leading Driver, 1.43> SCSI2 0/direct removable  sd0: could not mode sense (4/5); using fictitious geometry  sd0: 125MB, 125 cyl, 64 head, 32 sec, 512 bytes/sec, 256000 sec total

This kind of token is noname hardware.

Do you need help?X

I've found a solution for this problem in the bugtracking system of NetBSD.
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=18065

This small patch fix the problem. Tested on three different machines
(i386/macppc).

  • sys/scsi/sd.c Wed Jan 8 11:08:13 2003 +++ sys-orig/scsi/sd.c Wed Jan 8 10:55:34 2003 @@ -983,7 +983,7 @@ bzero(lp, sizeof(struct disklabel)); bzero(clp, sizeof(struct cpu_disklabel));
    • lp->d_secsize = sd->params.blksize; + lp->d_secsize = 512; lp->d_ntracks = sd->params.heads; lp->d_nsectors = sd->params.sectors; lp->d_ncylinders = sd->params.cyls;

I know this is not a "real" fix, but an ugly workaround.

How this problem could be fixed correctly?

OpenBSD 3.2-stable (GENERIC) #0: Tue Nov 26 00:04:35 CET 2002

    root@hawkeye.b4.mad:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel Pentium II ("GenuineIntel" 686-class, 512KB L2 cache) 447 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SYS,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR real mem = 267956224 (261676K)
avail mem = 242724864 (237036K)
using 3296 buffers containing 13500416 bytes (13184K) of memory mainbus0 (root)
bios0 at mainbus0: AT/286+(61) BIOS, date 10/12/98, BIOS32 rev. 0 @ 0xfadf0 apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown
pcibios0 at bios0: rev. 2.1 @ 0xf0000/0xb268

pcibios0: PCI IRQ Routing Table rev. 1.0 @ 0xfd8b0/144 (7 entries)
pcibios0: PCI Exclusive IRQs: 9 10 11 15
pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371SB PCI-ISA" rev 0x00)
pcibios0: PCI bus #1 is the last bus

bios0: ROM list: 0xc0000/0x8000 0xc8000/0x2800 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "Intel 82443BX PCI-AGP" rev 0x02 ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x02 pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "3DFX Interactive Banshee" rev 0x03 wsdisplay0 at vga1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02 pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility wd0 at pciide0 channel 0 drive 0: <IBM-DTTA-351010> wd0: 16-sector PIO, LBA, 9671MB, 16383 cyl, 16 head, 63 sec, 19807200 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 pciide0: channel 1 ignored (disabled)
uhci0 at pci0 dev 7 function 2 "Intel 82371AB USB" rev 0x01: irq 11 usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: vendor 0x0000 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered "Intel 82371AB Power Mgmt" rev 0x02 at pci0 dev 7 function 3 not configured ahc1 at pci0 dev 9 function 0 "Adaptec AHA-2940" rev 0x03: irq 10 ahc1: Single Channel A, SCSI Id=7, 16/255 SCBs scsibus0 at ahc1: 8 targets
ahc1: target 0 synchronous at 10.0MHz, offset = 0xf ahc1: target 0 using tagged queuing
sd0 at scsibus0 targ 0 lun 0: <IBM, DDRS-39130, S97B> SCSI2 0/direct fixed sd0: 8715MB, 8387 cyl, 10 head, 212 sec, 512 bytes/sec, 17850000 sec total ahc1: target 1 synchronous at 10.0MHz, offset = 0xf ahc1: target 1 using tagged queuing
sd1 at scsibus0 targ 1 lun 0: <SEAGATE, ST39140N, 1281> SCSI2 0/direct fixed sd1: 8192MB, 9006 cyl, 8 head, 232 sec, 512 bytes/sec, 16777216 sec total ahc1: target 4 synchronous at 10.0MHz, offset = 0xf cd0 at scsibus0 targ 4 lun 0: <TEAC, CD-R55S, 1.0N> SCSI2 5/cdrom removable unknown vendor 0x1244 product 0x0a00 (class network, subclass miscellaneous, rev 0x02) at pci0 dev 10 function 0 not configured rl0 at pci0 dev 11 function 0 "Realtek 8139" rev 0x10: irq 11 address 00:c0:26:a1:5d:8f rlphy0 at rl0 phy 0: RTL internal phy
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0 pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
sysbeep0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: using exception 16 pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec isapnp0 at isa0 port 0x279: read port 0x203 sb1 at isapnp0 "Creative ViBRA16X PnP, CTL0043, , Audio" port 0x220/16,0x330/2,0x388/4 irq 5 drq 1,3: dsp v4.16 midi1 at sb1: <SB MPU-401 UART>
audio0 at sb1
opl0 at sb1: model OPL3
midi2 at opl0: <SB Yamaha OPL3>
joy0 at isapnp0 "Creative ViBRA16X PnP, CTL7005, PNPB02F, Game" port 0x201/1 biomask 4c40 netmask 4c40 ttymask 5cc2
pctr: 686-class user-level performance counters enabled mtrr: Pentium Pro MTRR support
dkcsum: wd0 matched BIOS disk 81
dkcsum: sd0 matched BIOS disk 80
dkcsum: sd1 matched BIOS disk 82

root on sd0a
rootdev=0x400 rrootdev=0xd00 rawdev=0xd02 uhub0: device problem, disabling port 1
umass0 at uhub0 port 1 configuration 1 interface 0 umass0: Fujitsu Memorybird, rev 1.00/1.00, addr 2 umass0: using SCSI over BBB-P
scsibus1 at umass0: 2 targets
sd2 at scsibus1 targ 1 lun 0: <Fujitsu, Memorybird, 1.05> SCSI0 0/direct removable sd2: 1066MB, 500 cyl, 4 head, 16 sec, 34820 bytes/sec, 32000 sec total

thx in advance
  Waldemar

-- 
8485 D0CE 2743 656E 867C  5C93 0317 AFD8 BE21 BD90
Received on Wed Jan 22 09:51:36 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:48 EDT

Do you need more help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library