GEOM weirdness with SD flash reader?
Nate Lawson
nate at root.org
Mon Jul 2 04:48:55 UTC 2007
Poul-Henning Kamp wrote:
> In message <4688786F.5080408 at 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
More information about the freebsd-current
mailing list