Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jul 2015 21:57:58 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Ian Lepore <ian@FreeBSD.org>
Cc:        Luiz Otavio O Souza <lists.br@gmail.com>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, Warner Losh <imp@freebsd.org>
Subject:   Re: SDHC errors during boot on RPi2 (11.0-CURRENT)
Message-ID:  <08A8C4D5-54A5-432B-B3D7-744287B76EF9@bsdimp.com>
In-Reply-To: <1437072916.1334.364.camel@freebsd.org>
References:  <55A5A3F4.7040105@foxvalley.net> <D7A88FAC-C4C0-46DB-91F6-9AF51CD142B7@bsdimp.com> <20150716142329.4387b29de5d7fc9a2a9c27ab@strcmp.org> <CAB=2f8yMjZ4U3cNyCVt%2BemJQ7A5vGniuGevq0bQe36tw-RoR_Q@mail.gmail.com> <1437072916.1334.364.camel@freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]

> On Jul 16, 2015, at 12:55 PM, Ian Lepore <ian@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


[-- Attachment #2 --]
-----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-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?08A8C4D5-54A5-432B-B3D7-744287B76EF9>