diff --git a/sys/dev/sdmmc/sdmmc_mem.c b/sys/dev/sdmmc/sdmmc_mem.c index bc7b31c056ef..b672799bed0d 100644 --- a/sys/dev/sdmmc/sdmmc_mem.c +++ b/sys/dev/sdmmc/sdmmc_mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc_mem.c,v 1.16 2011/02/13 06:43:52 nonaka Exp $ */ +/* $NetBSD: sdmmc_mem.c,v 1.17 2011/02/13 07:25:56 nonaka Exp $ */ /* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -46,7 +46,7 @@ /* Routines for SD/MMC memory cards. */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.16 2011/02/13 06:43:52 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.17 2011/02/13 07:25:56 nonaka Exp $"); #include #include @@ -685,7 +685,7 @@ sdmmc_mem_mmc_init(struct sdmmc_softc *sc, struct sdmmc_function *sf) aprint_error_dev(sc->sc_dev, "can't read EXT_CSD\n"); return error; } - if ((sf->csd.csdver == 3) && + if ((sf->csd.csdver == MMC_CSD_CSDVER_EXT_CSD) && (ext_csd[EXT_CSD_STRUCTURE] > EXT_CSD_STRUCTURE_VER_1_2)) { aprint_error_dev(sc->sc_dev, "unrecognised future version (%d)\n", diff --git a/sys/dev/sdmmc/sdmmcreg.h b/sys/dev/sdmmc/sdmmcreg.h index df83bcb4aba3..6e99f7291255 100644 --- a/sys/dev/sdmmc/sdmmcreg.h +++ b/sys/dev/sdmmc/sdmmcreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmcreg.h,v 1.6 2011/02/13 06:43:52 nonaka Exp $ */ +/* $NetBSD: sdmmcreg.h,v 1.7 2011/02/13 07:25:56 nonaka Exp $ */ /* $OpenBSD: sdmmcreg.h,v 1.4 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -165,6 +165,7 @@ #define MMC_CSD_CSDVER_1_0 0 #define MMC_CSD_CSDVER_1_1 1 #define MMC_CSD_CSDVER_1_2 2 /* MMC 4.1 - 4.2 - 4.3 */ +#define MMC_CSD_CSDVER_EXT_CSD 3 /* Version is coded in CSD_STRUCTURE in EXT_CSD */ #define MMC_CSD_MMCVER(resp) MMC_RSP_BITS((resp), 122, 4) #define MMC_CSD_MMCVER_1_0 0 /* MMC 1.0 - 1.2 */ #define MMC_CSD_MMCVER_1_4 1 /* MMC 1.4 */