SD/CF card reader

Polytropon freebsd at edvax.de
Tue Dec 28 00:26:47 UTC 2010


On Sun, 26 Dec 2010 19:35:20 -0600, Adam Vande More <amvandemore at gmail.com> wrote:
> My understanding is that USB devices can only respond to information
> requests, not broadcast changes so that is why nothing is in dmesg
> indicating new media has been inserted. 

Yes, polling instead of interrupt-driven announcements, this
is what I understood, too. I did assume some kind of polling
mechanism inside the kernel (or *by* the kernel) that would
poll the "drive bays" of the SD/CF card reader to see when
they contain media.

Still the method of issuing something like

	# true > /dev/da1

looks wrong - even if it works. It looks like: "And now we
are overwriting the whole memory card with... erm... with
the truth, but at least we're overwriting it." This just
gives me a scary impression. There should be something
more "correct", such as resetting some bus via camcontrol
or re-reading a structure via usbdevs, but no > access
to the whole card.



> > GEOM: da1: partition 1 does not start on a track boundary.
> > GEOM: da1: partition 1 does not end on a track boundary.
> > GEOM: da1: partition 1 does not start on a track boundary.
> > GEOM: da1: partition 1 does not end on a track boundary.
> 
> 
> Yeah I don't know about that.  I think it's just a warning but maybe trying
> using FreeBSD zero out device, partition(slice) and newfs_msdos it.

Those messages seem to be uncritical as I've tried to access
various media - without any problems. Those cards work well
on my v7 system (where those messages aren't shown). I just
continue as if those messages haven't been issued.



> dd if=/dev/zero of=/dev/da0 bs=512k count=10
> fdisk -i /dev/da0
> newfs_msdos -F32 /dev/da0s1

But that will remove the content of the cards! :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list