From owner-freebsd-current@FreeBSD.ORG Wed Mar 23 20:34:02 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1358D16A4CE; Wed, 23 Mar 2005 20:34:02 +0000 (GMT) Received: from vbook.fbsd.ru (user184.hovrino.net [82.179.232.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1681F43D3F; Wed, 23 Mar 2005 20:34:00 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.50 (FreeBSD)) id 1DECXx-000BDW-Ol; Wed, 23 Mar 2005 23:33:45 +0300 From: Vladimir Grebenschikov To: John Baldwin In-Reply-To: <200503231411.46948.jhb@FreeBSD.org> References: <1110800717.1296.19.camel@localhost> <200503231411.46948.jhb@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Wed, 23 Mar 2005 23:33:45 +0300 Message-Id: <1111610025.1471.6.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: "current@freebsd.org" cc: freebsd-mobile@FreeBSD.org Subject: Re: Reattach/redetect allways connected umass device - is it possible ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2005 20:34:02 -0000 =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 at scbus1 target 0 lun 0 (pass0,da0) 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