Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2006 01:19:32 -0500
From:      Zaphod Beeblebrox <zbeeble@gmail.com>
To:        Doug White <dwhite@gumbysoft.com>
Cc:        freebsd-stable@freebsd.org, Dmitry Morozovsky <marck@rinet.ru>
Subject:   Re: USB Flash reader under RELENG_6: force GEOM rescan
Message-ID:  <5f67a8c40602092219r4109cf2fw99966f397aa41d86@mail.gmail.com>
In-Reply-To: <20060209160623.E10921@carver.gumbysoft.com>
References:  <200602091804.k19I41RN023914@lurza.secnetix.de> <20060209210748.L87003@woozle.rinet.ru> <20060209160623.E10921@carver.gumbysoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/9/06, Doug White <dwhite@gumbysoft.com> wrote:

How about 'fdisk da0'? :)


That's only bad when it actually decides to do something :).

I have a usb drive that takes a while to become ready after being
> inserted. It initially generates errors when attempting to access it.
> Yours may have a similar issue.
>

No... what he's talking about (and I have also commented on this issue) is
that many USB devices that talk to memory --- and we're not talking about
USB memory sticks per se, but more like 5-in-1 readers and whatnot --- "plu=
g
in" to USB and show up as disks with '0' blocks.  Many of these devices sho=
w
up as many drives (different "luns" in the SCSI speak) all with 0 bytes.

A good example of the problem is my Dell flat panel.  It has a USB
connection to the computer and it provides a USB hub with 4 ports and a 4
slot multi-card reader.  It shows up thusly:

da0 at umass-sim0 bus 0 target 0 lun 0
da0: <SMSC 223 U HS-CF 3.60> Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da1 at umass-sim0 bus 0 target 0 lun 1
da1: <SMSC 223 U HS-MS 3.60> Removable Direct Access SCSI-0 device
da1: 40.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
da2 at umass-sim0 bus 0 target 0 lun 2
da2: <SMSC 223 U HS-SM 3.60> Removable Direct Access SCSI-0 device
da2: 40.000MB/s transfers
da2: Attempt to query device size failed: NOT READY, Medium not present
da3 at umass-sim0 bus 0 target 0 lun 3
da3: <SMSC 223 U HS-SD/MMC 3.60> Removable Direct Access SCSI-0 device
da3: 40.000MB/s transfers
da3: Attempt to query device size failed: NOT READY, Medium not present

and a good summary:

[3:137:437]root@canoe:/usr/ports/astro/gpsd/work/gpsd-2.30> camcontrol
devlist
<SMSC 223 U HS-CF 3.60>            at scbus0 target 0 lun 0 (da0,pass0)
<SMSC 223 U HS-MS 3.60>            at scbus0 target 0 lun 1 (da1,pass1)
<SMSC 223 U HS-SM 3.60>            at scbus0 target 0 lun 2 (da2,pass2)
<SMSC 223 U HS-SD/MMC 3.60>        at scbus0 target 0 lun 3 (da3,pass3)

Obviously, one each for compact flash, memory stick, Smart media and SD/MMC=
.

Now... interestingly, if I put a card in, camcontrol rescan da3, it doesn't
realize that the media has changed, or that the media is anything but zero
blocks.

Several of the GEOM classes even panic if you ask them to attach to the
empty unit.  If the unit is full, attaching the null geom device works
somewhat like doing the "dd" trick from earlier in this thread.

But (just to show the sillyness of it) my current workaround to this proble=
m
(most times) is to turn off my monitor (thus dumping the USB hub and all
it's attachments).

Nasty.

Need to be able to rescan these things.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5f67a8c40602092219r4109cf2fw99966f397aa41d86>