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 we get a SDMA boundary-crossing interrupt a...
details: https://anonhg.NetBSD.org/src/rev/0c21ef65fb66
branches: trunk
changeset: 783439:0c21ef65fb66
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Thu Dec 20 22:56:38 2012 +0000
description:
If we get a SDMA boundary-crossing interrupt at the end of the final
segment, the transfer is not implicitly complete; we still need to wait
for the transfer complete interrupt so that we can issue new commands
successfully.
This fixes the problem my Ricoh R5C822 was having where all writes after
a larger (64KiB) write were failing because we attempted to issue CMD13
(to check the status of the aformentioned write) too soon afterwards.
I suspect this fix to apply to other Ricoh SDHCI controllers I've heard
people have had trouble with. Sorry I didn't look at this sooner.
diffstat:
sys/dev/sdmmc/sdhc.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 9c4b5a3f09ef -r 0c21ef65fb66 sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c Thu Dec 20 22:08:19 2012 +0000
+++ b/sys/dev/sdmmc/sdhc.c Thu Dec 20 22:56:38 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc.c,v 1.36 2012/12/20 14:37:00 jakllsch Exp $ */
+/* $NetBSD: sdhc.c,v 1.37 2012/12/20 22:56: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.36 2012/12/20 14:37:00 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.37 2012/12/20 22:56:38 jakllsch Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -1299,7 +1299,7 @@
mutex_exit(&hp->host_mtx);
if ((seg == (cmd->c_dmamap->dm_nsegs-1)) && (posaddr == (segaddr + seglen))) {
- break;
+ continue;
}
mutex_enter(&hp->host_mtx);
if ((posaddr >= segaddr) && (posaddr < (segaddr + seglen)))
Home |
Main Index |
Thread Index |
Old Index