From owner-freebsd-arm@freebsd.org Fri Jul 17 03:58:08 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B50A9A260F for ; Fri, 17 Jul 2015 03:58:08 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 072DC1E1A for ; Fri, 17 Jul 2015 03:58:07 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by ietj16 with SMTP id j16so69619288iet.0 for ; Thu, 16 Jul 2015 20:58:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=Q8jur2NwZe/q2CvxJxx5iETYg6pM10qHMWpF12T8iEw=; b=PfHuhJ0m711pyGApp6MAURIavAHdzUhP78dpoBfXe+mtFStRTFbpRihKqH1VAMtZ00 HPi5EuWDYeWXRkjCGv2IXxpgeUkTUMIbK6kQPuqMwwIL9bjZIFt9u80pcMc7wTVwmjjb 2r2bGhQEx71QarEbDPVixDQ7YPz1ol0wkSz12iTjEL8GpJUjSY7BTu2axr8mETEu4N5J kMfTieMmIIPl2IT1j2cj4e+YtiAgK9igWlRhs0wi5KRjpC4LMboBYJrE9cvti0UVyIkr ZxZ5cSzkssRx+NY1J62fU/4vWWAW3DFsPgwQDWmPS8VTVarRBVwvE8t7CoszFpaCaJsQ aTtw== X-Gm-Message-State: ALoCoQkj0yccgEVKE4uYnpKePU1Z377yX6p6Ol1Eg4dhsh38fZw9onhRrnF92tixcqUfXad8z4U3 X-Received: by 10.50.41.8 with SMTP id b8mr7862092igl.38.1437105481195; Thu, 16 Jul 2015 20:58:01 -0700 (PDT) Received: from [10.0.27.94] ([96.88.71.26]) by smtp.gmail.com with ESMTPSA id m1sm2807154igv.8.2015.07.16.20.58.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Jul 2015 20:58:00 -0700 (PDT) Sender: Warner Losh Subject: Re: SDHC errors during boot on RPi2 (11.0-CURRENT) Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FE0D1F64-07A2-428F-BB24-8B6B025E32AF"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5 From: Warner Losh In-Reply-To: <1437072916.1334.364.camel@freebsd.org> Date: Thu, 16 Jul 2015 21:57:58 -0600 Cc: Luiz Otavio O Souza , "freebsd-arm@freebsd.org" , Warner Losh Message-Id: <08A8C4D5-54A5-432B-B3D7-744287B76EF9@bsdimp.com> References: <55A5A3F4.7040105@foxvalley.net> <20150716142329.4387b29de5d7fc9a2a9c27ab@strcmp.org> <1437072916.1334.364.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.2102) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2015 03:58:08 -0000 --Apple-Mail=_FE0D1F64-07A2-428F-BB24-8B6B025E32AF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 16, 2015, at 12:55 PM, Ian Lepore wrote: >=20 > 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: >>>=20 >>>>> On Jul 14, 2015, at 6:06 PM, Dan Raymond wrote: >>>>>=20 >>>>> Is anyone else getting these errors during every boot? I'm = running r285346. >>>>=20 >>>> I=E2=80=99ve been running on the RPi2 for some time and have never = seen this. I haven=E2=80=99t >>>> rebuild in the past few weeks though. >>>>=20 >>>> Does this happen on either SD cards? Or other versions of the = kernel? >>>=20 >>> I've the same output (using generic RPI2 kernel conf). >>=20 >> This is a side effect of r283128, if you comment that line that >> re-select the card, CMD7 won't fail. >>=20 >> This also affects the MMC controller on Allwinner SoCs. >=20 > 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.) >=20 > The attached patch adds the explicit deselect; it may or may not help. > (I haven't tested this at all). >=20 > -- Ian >=20 > Index: mmc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- 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 --Apple-Mail=_FE0D1F64-07A2-428F-BB24-8B6B025E32AF Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVqH1GAAoJEGwc0Sh9sBEAaLcQAJQbgaulP03QcpPL1+tAkvV1 9F9gAL5eIoHaxSZTe7O2fQ2uxxpEvW6fpwBR10oy664Crdb6X1ty1xH9k/jMi4JV 1o7ueRRi791mzVm76bb7S3OKN0jdsIx84ovH7PJCYUPMS6lT6Q+uUiODyXJW61Pi tWmR3et9OY6Zf20EaP5ozVNkKZYMv5Ce76LOH5DTNrSJboOhdXDkEi8+cIYB+yEL baydKUDLwx5lzSTRp5lrtFSx5adBWf2qE92zxG/R0gRGXjWpBYqSz/f8LO+JyC8U BnucUEIZq9JirWX7oohZvetESgEUX+OYT2ygGGcdrLwHNoh5BVQj924HjDHLewkJ T62x1AFPmi1QerXUYbmxZXIZn8syaqc/lSR5rCXYAh8SHUHT+v90uz6XB+Gkppqf zNOObEaDgO4z++g8FB67XBKwqeHHVOFSHvuOXHDJ3ZOoCssx8A4Nqsi3SMzk1Fal ILwOdiHD6n4gHrI/e+F8tKigUbaNK5jphh9rYg+q8Ytj74eWaWVA8l4to1/5ZmVc b+Y0JX5vdhryYjDUuida9/G8BQLwKOcBfESyNwRmQU+xmeW0kkT2JmzxlrAk+lYu NeOiXhU/ew+0d3YgQ4yzH8PvRKRpBbA8lyBHJg8KBBE5hgO/HSodKCinuz7GSMYN Tbh9N7m/2aJYiawmBG4P =/3bz -----END PGP SIGNATURE----- --Apple-Mail=_FE0D1F64-07A2-428F-BB24-8B6B025E32AF--