Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc SMC_CAPS_DMA without SMC_CAPS_MULTI_SEG_DMA me...
details: https://anonhg.NetBSD.org/src/rev/ece45c53c53a
branches: trunk
changeset: 783466:ece45c53c53a
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sun Dec 23 22:33:09 2012 +0000
description:
SMC_CAPS_DMA without SMC_CAPS_MULTI_SEG_DMA means we as a host driver only
can support one segment per operation. This is not the case with SDHCI SDMA,
the only SDHCI DMA mechanism we currently support in sdhc(4). Should fix
corrupt data on DMA-enabled SDHCI controllers claiming conformance to a SDHCI
Specification other than 1.0.
diffstat:
sys/dev/sdmmc/sdhc.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diffs (30 lines):
diff -r 56f0d12154d5 -r ece45c53c53a sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c Sun Dec 23 21:01:03 2012 +0000
+++ b/sys/dev/sdmmc/sdhc.c Sun Dec 23 22:33:09 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc.c,v 1.38 2012/12/22 03:56:58 jakllsch Exp $ */
+/* $NetBSD: sdhc.c,v 1.39 2012/12/23 22:33:09 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.38 2012/12/22 03:56:58 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.39 2012/12/23 22:33:09 jakllsch Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -416,10 +416,7 @@
if (ISSET(caps, SDHC_HIGH_SPEED_SUPP))
saa.saa_caps |= SMC_CAPS_SD_HIGHSPEED;
if (ISSET(hp->flags, SHF_USE_DMA)) {
- saa.saa_caps |= SMC_CAPS_DMA;
- if (hp->specver == SDHC_SPEC_VERS_100) {
- saa.saa_caps |= SMC_CAPS_MULTI_SEG_DMA;
- }
+ saa.saa_caps |= SMC_CAPS_DMA | SMC_CAPS_MULTI_SEG_DMA;
}
if (ISSET(sc->sc_flags, SDHC_FLAG_SINGLE_ONLY))
saa.saa_caps |= SMC_CAPS_SINGLE_ONLY;
Home |
Main Index |
Thread Index |
Old Index