Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Jul 2007 21:48:47 -0700
From:      Nate Lawson <nate@root.org>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        current@FreeBSD.org, "M. Warner Losh" <imp@bsdimp.com>
Subject:   Re: GEOM weirdness with SD flash reader?
Message-ID:  <468883AF.8040300@root.org>
In-Reply-To: <42855.1183350086@critter.freebsd.dk>
References:  <42855.1183350086@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:
> 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

Ok.

> 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.

It doesn't get an interrupt or anything.  The only way to find media is
now present is through polling.  I suggested in another reply how to do
this from userland.  I just tested that method and it works.

-- 
Nate



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