Re (long): A-DATA flash drive: some oddities and how to add USB quirks

Igor B. Bykhalo goshik at binep.ac.ru
Wed Aug 13 05:02:50 PDT 2003


From: "Nate Lawson" <nate at root.org>
To: "Igor B. Bykhalo" <goshik at binep.ac.ru>
Cc: <current at freebsd.org>
Sent: Wednesday, August 13, 2003 2:56 AM
Subject: Re: A-DATA flash drive: some oddities and how to add USB quirks


> Looking at your dmesg output, I see that your drive is reporting that it's
> "not ready".  However, your dmesg doesn't show any actual failure.
> Instead it looks like CAM retries and then succeeds in probing the device.
>
> Please report the exact failure behavior and the dmesg of any errors.
>
> -Nate

Failures:

In attemp to mount:

> Script started on Wed Aug 13 15:48:11 2003
> goshik# mount -v -t msdos /dev/da0s1 /mnt
> msdos: /dev/da0s1: Device not configured
> goshik# exit
> exit
>
> Script done on Wed Aug 13 15:48:26 2003

Accompanied by console messages:

> Aug 13 15:48:23 goshik /kernel: (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> Aug 13 15:48:23 goshik /kernel: (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> Aug 13 15:48:23 goshik /kernel: (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> Aug 13 15:48:23 goshik /kernel: (da0:umass-sim0:0:0:0): NOT READY asc:3a,0
> Aug 13 15:48:23 goshik /kernel: (da0:umass-sim0:0:0:0): Medium not present

Some usb and camcontrol output:

> Script started on Wed Aug 13 15:39:37 2003
> goshik# usbdevs -v
> Controller /dev/usb0:
> addr 1: self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev 1.00
>  port 1 addr 2: self powered, config 1, USB Embedded Hub(0x2515), A-DATA Technology Inc.(0x067b), rev 0.01
>   port 1 addr 3: self powered, config 1, USB Mass Storage Device(0x2517), A-DATA Technology Inc.(0x067b), rev 0.01
>  port 2 powered
> goshik# camcontrol rescan all
> Re-scan of bus 0 was successful
> goshik# camcontrol devlist -v
> scbus0 on umass-sim0 bus 0:
> <A-DATA Flash 2.0 P1.0>            at scbus0 target 0 lun 0 (pass0,da0)
> scbus-1 on xpt0 bus 0:
> <  >                               at scbus-1 target -1 lun -1 (xpt0)
> goshik# camcontrol inquiry da0
> pass0: <A-DATA Flash 2.0 P1.0> Removable Direct Access SCSI-0 device
> pass0: Serial Number 
> pass0: 650KB/s transfers
> goshik# exit
> exit
>
> Script done on Wed Aug 13 15:40:25 2003

Camcontrol commands are accompanied by console messages:

> Aug 13 15:40:03 goshik /kernel: (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
> Aug 13 15:40:03 goshik /kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0
> Aug 13 15:40:03 goshik /kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 1 80 0 ff 0
> Aug 13 15:40:18 goshik /kernel: (pass0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0
> Aug 13 15:40:18 goshik /kernel: (pass0:umass-sim0:0:0:0): INQUIRY. CDB: 12 1 80 0 ff 0

>From dmesg (boot -v before above commands):

> Copyright (c) 1992-2003 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
> The Regents of the University of California. All rights reserved.
> FreeBSD 4.8-STABLE #31: Wed Aug 13 14:43:41 MSD 2003
>     goshik at goshik.binep.ac.ru:/usr/obj/usr/src/sys/GO
> Calibrating clock(s) ... TSC clock: 1334887190 Hz, i8254 clock: 1193117 Hz
> Timecounter "i8254"  frequency 1193117 Hz
> CPU: AMD Athlon(tm) XP 1500+ (1334.89-MHz 686-class CPU)
>   Origin = "AuthenticAMD"  Id = 0x662  Stepping = 2
>   Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
>   AMD Features=0xc0480000<MP,AMIE,DSP,3DNow!>
> Data TLB: 32 entries, fully associative
> Instruction TLB: 16 entries, fully associative
> L1 data cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative
> L1 instruction cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative
> L2 internal cache: 256 kbytes, 64 bytes/line, 1 lines/tag, 8-way associative
> real memory  = 268369920 (262080K bytes)
> Physical memory chunk(s):
> 0x000001000 - 0x00009ffff, 651264 bytes (159 pages)
> 0x000369000 - 0x00ffe7fff, 264761344 bytes (64639 pages)
> config> en apm0
> config> di psm0
> config> di ppc0
> config> q
> avail memory = 257847296 (251804K bytes)
> bios32: Found BIOS32 Service Directory header at 0xc00faf90
> bios32: Entry = 0xfb400 (c00fb400)  Rev = 0  Len = 1
> pcibios: PCI BIOS entry at 0xb430
> pnpbios: Found PnP BIOS data at 0xc00fbef0
> pnpbios: Entry = f0000:bf20  Rev = 1.0
> Other BIOS signatures found:
> ACPI: 000f66f0
> Preloaded elf kernel "kernel" at 0xc0342000.
> Preloaded userconfig_script "/boot/kernel.conf" at 0xc03420a8.
> Preloaded elf module "vesa.ko" at 0xc03420f8.
> Preloaded elf module "vn.ko" at 0xc0342194.
> Preloaded elf module "if_ef.ko" at 0xc0342230.
> Preloaded elf module "if_sis.ko" at 0xc03422d0.
> Preloaded elf module "miibus.ko" at 0xc0342370.
> Preloaded elf module "snd_via8233.ko" at 0xc0342410.
> Preloaded elf module "snd_pcm.ko" at 0xc03424b4.
> Preloaded elf module "usb.ko" at 0xc0342554.
> Preloaded elf module "ugen.ko" at 0xc03425f0.
> Preloaded elf module "umass.ko" at 0xc034268c.
> Preloaded elf module "snp.ko" at 0xc034272c.
[...]
> uhci0: <VIA 83C572 USB controller> port 0xd800-0xd81f irq 12 at device 17.2 on pci0
> usb0: <VIA 83C572 USB controller> on uhci0
> usb0: USB revision 1.0
> uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub0: 2 ports with 2 removable, self powered
> uhub1: A-DATA Technology Inc. USB Embedded Hub, class 9/0, rev 2.00/0.01, addr 2
> uhub1: 1 port with 0 removable, self powered
> umass0: A-DATA Technology Inc. USB Mass Storage Device, rev 2.00/0.01, addr 3
> umass0:0:0:-1: Attached to scbus0 as device 0
> uhci1: <VIA 83C572 USB controller> port 0xdc00-0xdc1f irq 12 at device 17.3 on pci0
> using shared irq12.
> usb1: <VIA 83C572 USB controller> on uhci1
> usb1: USB revision 1.0
> uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub2: 2 ports with 2 removable, self powered
[...]
> ad0: success setting UDMA5 on VIA chip
> Creating DISK ad0
> ar: FreeBSD check1 failed
> ad0: <WDC WD400EB-00CPF0/06.04G06> ATA-5 disk at ata0-master
> ad0: 38166MB (78165360 sectors), 77545 C, 16 H, 63 S, 512 B
> ad0: 16 secs/int, 1 depth queue, UDMA100
> ad0: piomode=4 dmamode=2 udmamode=5 cblid=1
> (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0
> (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 1 80 0 ff 0
> (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
> Creating DISK da0
> (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> pass0 at umass-sim0 bus 0 target 0 lun 0
> pass0: <A-DATA Flash 2.0 P1.0> Removable Direct Access SCSI-0 device
> pass0: Serial Number \^_
> pass0: 650KB/s transfers
> (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> ad0s1: type 0xa5, start 63, end = 78156224, size 78156162 : OK
> Mounting root from ufs:/dev/ad0s1a
> ad0s1: type 0xa5, start 63, end = 78156224, size 78156162 : OK
> start_init: trying /sbin/init
> (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> (da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> (da0:umass-sim0:0:0:0): NOT READY asc:3a,0
> (da0:umass-sim0:0:0:0): Medium not present
> da0 at umass-sim0 bus 0 target 0 lun 0
> da0: <A-DATA Flash 2.0 P1.0> Removable Direct Access SCSI-0 device
> da0: Serial Number \^_
> da0: 650KB/s transfers
> da0: Attempt to query device size failed: NOT READY, Medium not present
> Linux ELF exec handler installed

Part of kernel config:

>>>> Kernel config:

[...]
> options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI
> options USB_DEBUG
>
[...]
> # SCSI peripherals
> device scbus # SCSI bus (required)
> device da # Direct Access (disks)
> device pass # CAM passthrough driver
>
> options CAMDEBUG
> options CAM_DEBUG_BUS=0
> options CAM_DEBUG_TARGET=0
> options CAM_DEBUG_LUN=0
> options CAM_DEBUG_FLAGS="CAM_DEBUG_INFO|CAM_DEBUG_CDB"
> #options CAM_DEBUG_FLAGS="CAM_DEBUG_INFO|CAM_DEBUG_TRACE|CAM_DEBUG_CDB"
>
[...]

I can send full dmesg and kernel config if needed.
usb, umass and ugen were loaded as modules via loader.conf

TIA,
Igor



More information about the freebsd-current mailing list