From owner-freebsd-current@FreeBSD.ORG Mon Mar 28 14:06:17 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 E1E5616A51B; Mon, 28 Mar 2005 14:06:16 +0000 (GMT) Received: from vbook.fbsd.ru (swsoft-mipt-nat.sw.ru [195.214.233.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C86EE43D46; Mon, 28 Mar 2005 14:06:15 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.50 (FreeBSD)) id 1DFusd-00055F-3x; Mon, 28 Mar 2005 18:06:11 +0400 From: Vladimir Grebenschikov To: ticso@cicely.de In-Reply-To: <20050328132801.GD14532@cicely12.cicely.de> References: <30956.1112011996@critter.freebsd.dk> <1112014711.1022.37.camel@localhost> <20050328130451.GB14532@cicely12.cicely.de> <1112015844.1022.44.camel@localhost> <20050328132801.GD14532@cicely12.cicely.de> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Mon, 28 Mar 2005 18:06:10 +0400 Message-Id: <1112018770.1022.62.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: "Matthew N. Dodd" cc: freebsd-mobile@freebsd.org cc: Poul-Henning Kamp cc: Julian Elischer 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: Mon, 28 Mar 2005 14:06:17 -0000 =F7 =D0=CE, 28/03/2005 =D7 15:28 +0200, Bernd Walter =D0=C9=DB=C5=D4: > On Mon, Mar 28, 2005 at 05:17:24PM +0400, Vladimir Grebenschikov wrote: > > ? ??, 28/03/2005 ? 15:04 +0200, Bernd Walter ?????: > > > On Mon, Mar 28, 2005 at 04:58:31PM +0400, Vladimir Grebenschikov wrot= e: > > > > ? ??, 28/03/2005 ? 14:13 +0200, Poul-Henning Kamp ?????: > > > > > In message <20050328114633.GZ14532@cicely12.cicely.de>, Bernd Wal= ter writes: > > > > >=20 > > > > > >> camcontrol detach da0; camcontrol rescan all=20 > > > > > >> helps, but, it should be much better if it will be issued auto= matically. > > > > > > > > > > > >Yes - GEOM seems to ignore media change signals from drives. > > > > > >I've added PHK to the recipient list - maybe he has an idea abou= t this > > > > > >problem. > > > > >=20 > > > > > No, GEOM doesn't ignore any such thing, because as far as I know > > > > > GEOM doesn't get any such thing to ignore in the first place. > > > >=20 > > > > So, let's imagine following situation: > > > >=20 > > > > We get SCSI BUS with removable da device. > > > > device detected as da0 and not mounted. > > > > Device disconnected from SCSI bus. > > > > And finally, another device with different geometry connected with = same > > > > SCIS ID. > > >=20 > > > This ist not a *media* exchange - this is a *device* and in > > > this case even a scbus exchange. > >=20 > > Ok, so my case is media exchange, not device exchange. >=20 > No - it is a device exchange. > GEOM only has problems with media exchange. > A new device is no problem for GEOM. > Your problem is very likely not GEOM related. I guess, may bad example messed up discussion. sorry. >From begin: I have USB-connected card-reader (Sony Memory Stick). It connected as umass0 (ehci), then as da0. It can't be unplugged. (on-board notebook device) Problem: When I change card (it was not mounted) da0 device does not detect media change and following mount fails. Workarounds (I know three at this moment): - kldunload umass; kldload umass - the ugliest, will affect other umass devices. - cat /dev/null > /dev/da0 before mount - GEOM hacking=20 (also I do not like do cat into device with data) - camcontrol detach da0; camcontrol rescan all - requires CAM patch So, I am asking about solution, how it is supposed to work,=20 I guess, like with CD, there is should not be special exercises after card change. Probably my card-read is too stupid to send any media change notifications, how to test it ? Another, probably related question, is there way to detect card insertion/removal ? > > How it is supposed to work in this case ?=20 >=20 > You get a new device and all layers are freshly setup. > That is get's the same device numers as the old is unrelated, it's > still a new device after all. >=20 > You should see why your disconnect doesn't work. It is not disconnected physically, just card removed. > Do you run recent RELENG_5 or -current code? 6-CURRENT. > Disconnect the device and "ps -axl | grep usb" - you will see the > usb threads - each host controller has one of them. > Normaly idle usb threads should wait in usbevt and usbtask should > wait in usbtsk - see what it is in your case. --=20 Vladimir B. Grebenchikov vova@fbsd.ru