SDHC errors during boot on RPi2 (11.0-CURRENT)

Ian Lepore ian at freebsd.org
Sat Jul 18 16:57:36 UTC 2015


On Sat, 2015-07-18 at 01:03 +0000, Glen Barber wrote:
> On Sat, Jul 18, 2015 at 03:01:57AM +0200, Andreas Schwarz wrote:
> > On Fri, 17 Jul 2015 08:55:48 -0600
> > Ian Lepore <ian at freebsd.org> wrote:
> > 
> > > On Thu, 2015-07-16 at 21:57 -0600, Warner Losh wrote:
> > > > > On Jul 16, 2015, at 12:55 PM, Ian Lepore <ian at FreeBSD.org> wrote:
> > > > > 
> > > > > On Thu, 2015-07-16 at 15:17 -0300, Luiz Otavio O Souza wrote:
> > > > >> On 16 July 2015 at 09:23, Andreas Schwarz wrote:
> > > > >>> On Wed, 15 Jul 2015 21:17:21 -0600
> > > > >>> Warner Losh wrote:
> > > > >>> 
> > > > >>>>> On Jul 14, 2015, at 6:06 PM, Dan Raymond wrote:
> > > > >>>>> 
> > > > >>>>> Is anyone else getting these errors during every boot?  I'm running r285346.
> > > > >>>> 
> > > > >>>> I’ve been running on the RPi2 for some time and have never seen this. I haven’t
> > > > >>>> rebuild in the past few weeks though.
> > > > >>>> 
> > > > >>>> Does this happen on either SD cards? Or other versions of the kernel?
> > > > >>> 
> > > > >>> I've the same output (using generic RPI2 kernel conf).
> > > > >> 
> > > > >> This is a side effect of r283128, if you comment that line that
> > > > >> re-select the card, CMD7 won't fail.
> > > > >> 
> > > > >> This also affects the MMC controller on Allwinner SoCs.
> > > > > 
> > > > > Hmm, so some cards deselect themselves when they shouldn't, and our
> > > > > workaround that reselects them fails if the card didn't deselect itself.
> > > > > Maybe it will work for all cards/controllers if we explicitly deselect
> > > > > then reselect the card at that point.  (This only happens once at
> > > > > card-insert/boot time, so it shouldn't impact performance.)
> > > > > 
> > > > > The attached patch adds the explicit deselect; it may or may not help.
> > > > > (I haven't tested this at all).
> > > > > 
> > > > > -- Ian
> > > > > 
> > > > > Index: mmc.c
> > > > > ===================================================================
> > > > > --- mmc.c	(revision 285419)
> > > > > +++ mmc.c	(working copy)
> > > > > @@ -1392,6 +1392,7 @@ mmc_discover_cards(struct mmc_softc *sc)
> > > > > 			 * out. Others seem to handle it correctly, so it may
> > > > > 			 * be a combination of card and controller.
> > > > > 			 */
> > > > > +			mmc_select_card(sc, 0);
> > > > > 			mmc_select_card(sc, ivar->rca);
> > > > > 			mmc_app_sd_status(sc, ivar->rca, ivar->raw_sd_status);
> > > > > 			mmc_app_decode_sd_status(ivar->raw_sd_status,
> > > > 
> > > > Yes. I like this. Update the comment though please.
> > > > 
> > > > Warner
> > > > 
> > > 
> > > Yeah, when I commit I'll make the comment match the new reality, just
> > > waiting to hear another success report or two first.
> > 
> > I can confirm that the problem is gone (after applying your patch to r285661).
> > 
> > root at pizelot:~ # uname -a
> > FreeBSD pizelot.schwarzes.net 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r285661M: Sat Jul 18 02:19:21 CEST 2015     root at pizelot.schwarzes.net:/usr/obj/usr/src/sys/RPI2  arm
> > 
> 
> Ian, will you please commit the fix, with the plan to have this in the
> next 10.2 build?
> 
> Glen
> 

Done, r285678.

-- Ian




More information about the freebsd-arm mailing list