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 the command protocol calls for a trailing b...



details:   https://anonhg.NetBSD.org/src/rev/ad756e459365
branches:  trunk
changeset: 783789:ad756e459365
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Tue Jan 08 19:36:38 2013 +0000

description:
If the command protocol calls for a trailing busy signal,
wait (up to 10 seconds) for it to be released.

diffstat:

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

diffs (31 lines):

diff -r c52d5d6f4427 -r ad756e459365 sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c      Tue Jan 08 19:19:24 2013 +0000
+++ b/sys/dev/sdmmc/sdhc.c      Tue Jan 08 19:36:38 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdhc.c,v 1.41 2013/01/07 02:56:24 jakllsch Exp $       */
+/*     $NetBSD: sdhc.c,v 1.42 2013/01/08 19:36:38 jakllsch 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.41 2013/01/07 02:56:24 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.42 2013/01/08 19:36:38 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -1127,6 +1127,12 @@
         */
        if (cmd->c_error == 0 && cmd->c_data != NULL)
                sdhc_transfer_data(hp, cmd);
+       else if (ISSET(cmd->c_flags, SCF_RSP_BSY)) {
+               if (!sdhc_wait_intr(hp, SDHC_TRANSFER_COMPLETE, hz * 10)) {
+                       cmd->c_error = ETIMEDOUT;
+                       goto out;
+               }
+       }
 
 out:
        if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)



Home | Main Index | Thread Index | Old Index