From owner-freebsd-current@FreeBSD.ORG Mon Jul 2 04:21:28 2007 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF28B16A41F for ; Mon, 2 Jul 2007 04:21:28 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 92FB513C447 for ; Mon, 2 Jul 2007 04:21:28 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 4021817383; Mon, 2 Jul 2007 04:21:27 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.1/8.14.1) with ESMTP id l624LQtx042856; Mon, 2 Jul 2007 04:21:26 GMT (envelope-from phk@critter.freebsd.dk) To: Nate Lawson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 01 Jul 2007 21:00:47 MST." <4688786F.5080408@root.org> Date: Mon, 02 Jul 2007 04:21:26 +0000 Message-ID: <42855.1183350086@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: current@FreeBSD.org, "M. Warner Losh" Subject: Re: GEOM weirdness with SD flash reader? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2007 04:21:28 -0000 In message <4688786F.5080408@root.org>, Nate Lawson writes: >M. Warner Losh wrote: >Nope, dmarck is right. The reader was inserted "empty", then the media >was added. It took a write to the device (maybe via the mount attempt >of /dev/da2) to trigger a re-taste. Actually you only need to open it for write, I usually use: true > /dev/da2 The problem here is, quite simply, that nobody tells GEOM that a card has been inserted. opening for a write and then closing it forces a retaste because metadata blocks could have been written. The correct fix for this is to have scsi_da tell geom that the card was inserted. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.