A-DATA flash drive: "Attempt to query device size failed"

Kevin Oberman oberman at es.net
Tue Aug 5 07:31:31 PDT 2003

> From: "Igor B. Bykhalo" <goshik at binep.ac.ru>
> Date: Tue, 5 Aug 2003 14:18:50 +0400
> Sender: owner-freebsd-stable at freebsd.org
> I purchased the 256 MB A-DATA flash drive (USB 2.0 SpeedDrive),
> but the system can't query its size. Here is corresponding parts
> of system messages (boot -v):
> Aug  5 12:53:57 goshik /kernel: uhub1: A-DATA Technology Inc. USB Embedded Hub, class 9/0, rev 2.00/0.01, addr 2
> Aug  5 12:53:58 goshik /kernel: uhub1: 1 port with 0 removable, self powered

Hmm. Looks like a hub as well as a storage device. I'm not too sure
what impact that might have.

> 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 Tue Aug  5 13:42:17 2003
> I tried to add the following quirk to cam/scsi/scsi_da.c
> and rebuilt kernel, but nothing changed. (Actually,
> i tried also with only DA_Q_NO_6_BYTE, but this didn't help either)
> {
>   /*
>    * A-DATA USB Flash 2.0 P1.0 SpeedDrive
>    */
>   {T_DIRECT, SIP_MEDIA_REMOVABLE, "A-DATA", "Flash Disk", "*"},
>   /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
> }
> Can someone help me with this? I don't know what else
> to do...

I don't think the quirk is right. I'd try:
> {
>   /*
>    * A-DATA USB Flash 2.0 P1.0 SpeedDrive
>    */
>   {T_DIRECT, SIP_MEDIA_REMOVABLE, "A-DATA", "Flas*", "*"},
>   /*quirks*/ DA_Q_NO_6_BYTE|DA_Q_NO_SYNC_CACHE
> }

Also, you either need to append a comma to the close brace (if this is
inserted in the list of quirks) or append a comma to the prior entry
if you are placing this at the end of the quirks. (I suspect that you
did this, but it is not clear.)

I'm not too sure how many of the fixes in 5.0 have been MFC'ed to
STABLE. The 5.0 USB code has had a lot of work of late and most flash
drives just work, now. I imagine that most of these will get to STABLE
soon. The 10 byte command issue was just resolved in current last
week, so it should make it into STABLE in a couple of weeks unless
there is an issue with STABLE that I m not aware of.

If I missed something obvious, perhaps someone else can point it out.
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman at es.net			Phone: +1 510 486-8634

More information about the freebsd-questions mailing list