Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Dec 2010 01:26:44 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Adam Vande More <amvandemore@gmail.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: SD/CF card reader
Message-ID:  <20101228012644.03ded464.freebsd@edvax.de>
In-Reply-To: <AANLkTi=O8KWOz-J85FzB7giDUtwtkDbhq-B8LKAiQP47@mail.gmail.com>
References:  <20101227004708.c2d02d15.freebsd@edvax.de> <AANLkTikQHoDsDxx30joFa3guNSCiJ_EJuEZV5zLhk=b1@mail.gmail.com> <20101227013359.434b743d.freebsd@edvax.de> <AANLkTik1SrAp_ySW3_GX_8rPQU4%2BWEJe=hHdJKgr6hVS@mail.gmail.com> <20101227020125.9ab1a07f.freebsd@edvax.de> <AANLkTi=O8KWOz-J85FzB7giDUtwtkDbhq-B8LKAiQP47@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 26 Dec 2010 19:35:20 -0600, Adam Vande More <amvandemore@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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101228012644.03ded464.freebsd>