Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sdmmc don't hold intr_lock while calling sdhc_execut...



details:   https://anonhg.NetBSD.org/src/rev/4507e83c0776
branches:  trunk
changeset: 809868:4507e83c0776
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Aug 06 09:30:55 2015 +0000

description:
don't hold intr_lock while calling sdhc_execute_tuning

diffstat:

 sys/dev/sdmmc/sdhc.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r eb5ff925ac91 -r 4507e83c0776 sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c      Thu Aug 06 08:23:14 2015 +0000
+++ b/sys/dev/sdmmc/sdhc.c      Thu Aug 06 09:30:55 2015 +0000
@@ -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 @@
        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)) {



Home | Main Index | Thread Index | Old Index