diff options
Diffstat (limited to 'sys/dev/sdmmc/sdmmc_mem.c')
-rw-r--r-- | sys/dev/sdmmc/sdmmc_mem.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/sdmmc/sdmmc_mem.c b/sys/dev/sdmmc/sdmmc_mem.c index 151aa385704..8beda36b6fb 100644 --- a/sys/dev/sdmmc/sdmmc_mem.c +++ b/sys/dev/sdmmc/sdmmc_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdmmc_mem.c,v 1.8 2008/11/24 07:32:08 blambert Exp $ */ +/* $OpenBSD: sdmmc_mem.c,v 1.9 2008/12/02 23:49:54 deraadt Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -51,8 +51,6 @@ sdmmc_mem_enable(struct sdmmc_softc *sc) u_int32_t host_ocr; u_int32_t card_ocr; - SDMMC_ASSERT_LOCKED(sc); - /* Set host mode to SD "combo" card or SD memory-only. */ SET(sc->sc_flags, SMF_SD_MODE|SMF_MEM_MODE); @@ -116,8 +114,6 @@ sdmmc_mem_scan(struct sdmmc_softc *sc) int error; int i; - SDMMC_ASSERT_LOCKED(sc); - /* * CMD2 is a broadcast command understood by SD cards and MMC * cards. All cards begin to respond to the command, but back @@ -335,7 +331,7 @@ sdmmc_mem_send_op_cond(struct sdmmc_softc *sc, u_int32_t ocr, int error; int i; - SDMMC_ASSERT_LOCKED(sc); + SDMMC_LOCK(sc); /* * If we change the OCR value, retry the command until the OCR @@ -365,6 +361,7 @@ sdmmc_mem_send_op_cond(struct sdmmc_softc *sc, u_int32_t ocr, if (error == 0 && ocrp != NULL) *ocrp = MMC_R3(cmd.c_resp); + SDMMC_UNLOCK(sc); return error; } @@ -377,8 +374,6 @@ sdmmc_mem_set_blocklen(struct sdmmc_softc *sc, struct sdmmc_function *sf) { struct sdmmc_command cmd; - SDMMC_ASSERT_LOCKED(sc); - bzero(&cmd, sizeof cmd); cmd.c_opcode = MMC_SET_BLOCKLEN; cmd.c_arg = sf->csd.sector_size; |