Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/sdmmc If a mem function fails to initialize, set the...



details:   https://anonhg.NetBSD.org/src/rev/b170e90414d4
branches:  trunk
changeset: 451574:b170e90414d4
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue May 28 00:25:27 2019 +0000

description:
If a mem function fails to initialize, set the error flag so sdmmc doesn't try to use it anyway.

diffstat:

 sys/dev/sdmmc/sdmmc_mem.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 26ef3efa1823 -r b170e90414d4 sys/dev/sdmmc/sdmmc_mem.c
--- a/sys/dev/sdmmc/sdmmc_mem.c Tue May 28 00:02:32 2019 +0000
+++ b/sys/dev/sdmmc/sdmmc_mem.c Tue May 28 00:25:27 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdmmc_mem.c,v 1.66 2018/11/09 14:38:36 jmcneill Exp $  */
+/*     $NetBSD: sdmmc_mem.c,v 1.67 2019/05/28 00:25:27 jmcneill Exp $  */
 /*     $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $      */
 
 /*
@@ -45,7 +45,7 @@
 /* Routines for SD/MMC memory cards. */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.66 2018/11/09 14:38:36 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.67 2019/05/28 00:25:27 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -589,6 +589,9 @@
        else
                error = sdmmc_mem_mmc_init(sc, sf);
 
+       if (error != 0)
+               SET(sf->flags, SFF_ERROR);
+
 out:
        SDMMC_UNLOCK(sc);
 



Home | Main Index | Thread Index | Old Index