Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Mar 2005 23:33:45 +0300
From:      Vladimir Grebenschikov <vova@fbsd.ru>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        freebsd-mobile@FreeBSD.org
Subject:   Re: Reattach/redetect allways connected umass device - is it possible ?
Message-ID:  <1111610025.1471.6.camel@localhost>
In-Reply-To: <200503231411.46948.jhb@FreeBSD.org>
References:  <1110800717.1296.19.camel@localhost> <200503231411.46948.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
=F7 =D3=D2, 23/03/2005 =D7 14:11 -0500, John Baldwin =D0=C9=DB=C5=D4:
> On Monday 14 March 2005 06:45 am, Vladimir Grebenschikov wrote:
> > Hi
> >
> > I have SONY notebook with integrated memory stick card reader. It
> > appears as USB umass device and works well.
> >
> > Usbdevs output is here:
> > Controller /dev/usb3:
> > addr 1: high speed, self powered, config 1, EHCI root hub(0x0000),
> > Intel(0x0000), rev 1.00, device uhub4 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, device umass1 port 6 powered
> >
> > Only problem is that card-reader itself toes not detach USB device on f=
lash
> > removal. So if I change card to another card of different size it is no=
t
> > detected and da0 device still has old geometry.
> >
> > 'camcontrol rescan' does not helps.
> >
> > For previous Sony notebook stick reader was attached to ATA bus and I
> > workaround this problem with atacontrol detach/attach.
> >
> > How to do same with USB-attached umass device, I mean how to rescan thi=
s
> > device for physical geometry.
> >
> > I found only solution - kldunload umass && kldload umass, but it is ugl=
y.
> > And can be problem in case when another umass device connected.
>=20
> Have you tried doing a 'camcontrol eject da0', swapping out the sticks an=
d=20
> then seeing if da0 comes back with new geometry?  Possibly doing a=20
> 'camcontrol rescan' to force it to see the new stick?

No, not it does not, it actually prevents memory stick from working.

# camcontrol devlist
<Sony MSC-U04 3.00>                at scbus1 target 0 lun 0 (pass0,da0)
<MATSHITA UJDA755 DVD/CDRW 1.00>   at scbus3 target 0 lun 0 (pass1,cd0)
# camcontrol eject da0
Error received from stop unit command
# camcontrol eject da0
Unit stopped successfully, Media ejected
# mount /m/stick
msdosfs: /dev/da0s1: Device not configured
# camcontrol rescan all
Re-scan of bus 0 was successful
Re-scan of bus 1 was successful
Re-scan of bus 2 was successful
Re-scan of bus 3 was successful
# mount /m/stick
msdosfs: /dev/da0s1: No such file or directory
# mount -t msdosfs /dev/da0 /m/stick
msdosfs: /dev/da0: Invalid argument
# dmesg
...
(da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0=20
(da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI Status: Check Condition
(da0:umass-sim0:0:0:0): NOT READY asc:3a,0
(da0:umass-sim0:0:0:0): Medium not present
(da0:umass-sim0:0:0:0): Unretryable error
Opened disk da0 -> 6
...

--=20
Vladimir B. Grebenchikov
vova@fbsd.ru



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