Module Name: src
Committed By: jmcneill
Date: Thu Aug 6 09:30:55 UTC 2015
Modified Files:
src/sys/dev/sdmmc: sdhc.c
Log Message:
don't hold intr_lock while calling sdhc_execute_tuning
To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/sdmmc/sdhc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.80 src/sys/dev/sdmmc/sdhc.c:1.81
--- src/sys/dev/sdmmc/sdhc.c:1.80 Wed Aug 5 12:28:47 2015
+++ src/sys/dev/sdmmc/sdhc.c Thu Aug 6 09:30:55 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc.c,v 1.80 2015/08/05 12:28:47 jmcneill Exp $ */
+/* $NetBSD: sdhc.c,v 1.81 2015/08/06 09:30:55 jmcneill Exp $ */
/* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.80 2015/08/05 12:28:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.81 2015/08/06 09:30:55 jmcneill Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -1388,12 +1388,12 @@ sdhc_exec_command(sdmmc_chipset_handle_t
struct sdhc_host *hp = (struct sdhc_host *)sch;
int error;
- mutex_enter(&hp->intr_lock);
-
if (atomic_cas_uint(&hp->tuning_timer_pending, 1, 0) == 1) {
(void)sdhc_execute_tuning(hp, hp->tuning_timing);
}
+ mutex_enter(&hp->intr_lock);
+
if (cmd->c_data && ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)) {
const uint16_t ready = SDHC_BUFFER_READ_READY | SDHC_BUFFER_WRITE_READY;
if (ISSET(hp->flags, SHF_USE_DMA)) {