Reattach/redetect allways connected umass device - is it
possible ?
Bernd Walter
ticso at cicely12.cicely.de
Mon Mar 28 03:47:48 PST 2005
On Mon, Mar 28, 2005 at 03:35:10PM +0400, Vladimir Grebenschikov wrote:
> ? ??, 28/03/2005 ? 13:11 +0200, Bernd Walter ?????:
> > >
> > > Unfortunately, it seen as not-ejectable media.
> > >
> > > # camcontrol inquiry da0
> > > pass0: <Sony MSC-U04 3.00> Removable Direct Access SCSI-0 device
> > > pass0: Serial Number 3
> > > pass0: 40.000MB/s transfers
> > > #
> >
> > It's _removeable_ direct access.
>
> oops, sorry. yes it is mentioned as removable.
>
> > Since this is a memory stick - I don't know how one could remove the
> > flash media from the USB drive.
>
> Just mechanically.
>
> > But this device bug won't hurt as long as you can remove the drive.
>
> I can remove even mounted device. So it is not problem.
So in fact it is a flash card reader?
In that case removeable is correct.
You shouldn't eject mounted media - FreeBSD locks mounted media, but
since your device can't physically lock it...
> Problem is that I should do something after replace card by another card
> of different size to be able mount new card.
Yes - as already mentioned on the list by diffrent people:
cp /dev/null > /dev/da0
> camcontrol detach da0; camcontrol rescan all
> helps, but, it should be much better if it will be issued automatically.
Yes - GEOM seems to ignore media change signals from drives.
I've added PHK to the recipient list - maybe he has an idea about this
problem.
However - lots of cheap flash card readers are to stupid for even that.
You just can't rely on an automatic reread.
> > > # usbdevs -v
> > > ...
> > > Controller /dev/usb3:
> > > addr 1: high speed, self powered, config 1, EHCI root hub(0x0000),
> > > Intel(0x0000), rev 1.00
> > > port 1 powered
> > > port 2 powered
> > > port 3 powered
> > > port 4 powered
> > > port 5 addr 2: high speed, self powered, config 1, USB Memory Stick
> > > Slot(0x014d), Sony(0x054c), rev 1.10
> > > port 6 powered
> > > #
> > >
> > > I guess usb device should be removed on skick removal and back, but it
> > > does not works :(.
> >
> > So you say that the device still exists after unplugging the USB stick?
>
> Yes.
That shouldn't happen, unless you still have references to that device.
Are you running with latest code?
There were lots of ehci fixes lately.
> > This is not the intended behavour. Is it still mounted when you unplug?
>
> No. (If be more exact it does not depends on mount state).
> USB device never disappear. Probably it reflect real state, I guess,
> card-reader itself hardwired to USB hub inside notebook and never
> disconnected.
>
> Probably there is kind of disconnect notification on CAM level ?
The first disconnect notification is from your root hub.
The uhub driver then destroys the umass, which first destroys the
scbus and so on.
If one instance on the chain blocks the whole thing has to wait.
--
B.Walter BWCT http://www.bwct.de
bernd at bwct.de info at bwct.de
More information about the freebsd-mobile
mailing list