NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/60311: eMMC not powering up (used to work)
The following reply was made to PR kern/60311; it has been noted by GNATS.
From: Jared McNeill <jmcneill%invisible.ca@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
martin%NetBSD.org@localhost
Subject: Re: kern/60311: eMMC not powering up (used to work)
Date: Sat, 6 Jun 2026 12:50:38 -0300 (ADT)
On Fri, 5 Jun 2026, Martin Husemann via gnats wrote:
> Fix suggested by mlelstv. This also affects netbsd-10 and netbsd-11.
>
> When we see an error from the host controller, delay the soft reset by 100us.
>
> Index: sys/dev/sdmmc/sdhc.c
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/sdmmc/sdhc.c,v
> retrieving revision 1.125
> diff -u -p -r1.125 sdhc.c
> --- sys/dev/sdmmc/sdhc.c 9 Jan 2026 22:54:34 -0000 1.125
> +++ sys/dev/sdmmc/sdhc.c 5 Jun 2026 20:37:48 -0000
> @@ -2356,8 +2356,10 @@ sdhc_wait_intr(struct sdhc_host *hp, int
>
> if (nointr ||
> (ISSET(status, SDHC_ERROR_INTERRUPT) && error)) {
> - if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED))
> + if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)) {
> + sdmmc_delay(100);
> (void)sdhc_soft_reset(hp, SDHC_RESET_CMD|SDHC_RESET_DAT);
> + }
> hp->intr_error_status = 0;
> status = 0;
> }
>
> Without this second part I get random failures (differing between cold
> boot and also changing after soft reboot). The most populare failures is
> "unknown MMC version 6".
The patch looks fine, but RK356x doesn't set SDHC_FLAG_ENHANCED, so I'm
struggling to see how this changes anything for you?
When SDHC_FLAG_ENHANCED is NOT set, both with and without this patch, the
delay and sdhc_soft_reset lines will be executed. What am I missing?
Home |
Main Index |
Thread Index |
Old Index