From owner-freebsd-current@FreeBSD.ORG Mon Mar 28 13:13:44 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 1789B16A4CE for ; Mon, 28 Mar 2005 13:13:44 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42F5643D1F for ; Mon, 28 Mar 2005 13:13:43 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2SDDcsf093639 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Mon, 28 Mar 2005 15:13:39 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j2SDDKVK087619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Mar 2005 15:13:21 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2SDDK59027379; Mon, 28 Mar 2005 15:13:20 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2SDDJe4027378; Mon, 28 Mar 2005 15:13:19 +0200 (CEST) (envelope-from ticso) Date: Mon, 28 Mar 2005 15:13:19 +0200 From: Bernd Walter To: Poul-Henning Kamp Message-ID: <20050328131318.GC14532@cicely12.cicely.de> References: <20050328114633.GZ14532@cicely12.cicely.de> <30956.1112011996@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <30956.1112011996@critter.freebsd.dk> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: "current@freebsd.org" cc: Vladimir Grebenschikov cc: "Matthew N. Dodd" cc: freebsd-mobile@freebsd.org cc: Julian Elischer cc: ticso@cicely.de 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: ticso@cicely.de 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 13:13:44 -0000 On Mon, Mar 28, 2005 at 02:13:16PM +0200, Poul-Henning Kamp wrote: > In message <20050328114633.GZ14532@cicely12.cicely.de>, Bernd Walter writes: > > >> 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. > > 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. At least with (most) SCSI devices you get a media changed exception on the first access after that. Don't know if you see them under GEOM, but the kernel prints it: Mar 28 15:09:21 cicely13 kernel: (da0:ahc0:0:1:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 Mar 28 15:09:21 cicely13 kernel: (da0:ahc0:0:1:0): CAM Status: SCSI Status Error Mar 28 15:09:21 cicely13 kernel: (da0:ahc0:0:1:0): SCSI Status: Check Condition Mar 28 15:09:21 cicely13 kernel: (da0:ahc0:0:1:0): UNIT ATTENTION asc:28,0 Mar 28 15:09:21 cicely13 kernel: (da0:ahc0:0:1:0): Not ready to ready change, medium may have changed Mar 28 15:09:21 cicely13 kernel: (da0:ahc0:0:1:0): Retrying Command (per Sense Data) This was introduced with cp /dev/null /dev/da0, but happens on every possible access. As I said - many cheap devices are to stupid for this, but at least it's defined for SCSI and quality devices usually support it. This is true for all kind of removeable device types, da, cd, sa, ... -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de