Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc Fix SCR data.
details: https://anonhg.NetBSD.org/src/rev/a88a1d71ebf8
branches: trunk
changeset: 757740:a88a1d71ebf8
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Mon Sep 20 09:34:47 2010 +0000
description:
Fix SCR data.
diffstat:
sys/dev/sdmmc/sdmmc_mem.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 990dd0b4e613 -r a88a1d71ebf8 sys/dev/sdmmc/sdmmc_mem.c
--- a/sys/dev/sdmmc/sdmmc_mem.c Mon Sep 20 09:30:20 2010 +0000
+++ b/sys/dev/sdmmc/sdmmc_mem.c Mon Sep 20 09:34:47 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdmmc_mem.c,v 1.7 2010/09/20 09:30:20 kiyohara Exp $ */
+/* $NetBSD: sdmmc_mem.c,v 1.8 2010/09/20 09:34:47 kiyohara Exp $ */
/* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */
/*
@@ -46,7 +46,7 @@
/* Routines for SD/MMC memory cards. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.7 2010/09/20 09:30:20 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.8 2010/09/20 09:34:47 kiyohara Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -746,8 +746,11 @@
int ver;
memset(resp, 0, sizeof(resp));
- resp[0] = sf->raw_scr[1];
- resp[1] = sf->raw_scr[0];
+ /*
+ * Change the raw-scr received from the DMA stream to resp.
+ */
+ resp[0] = be32toh(sf->raw_scr[1]);
+ resp[1] = be32toh(sf->raw_scr[0]) >> 8;
ver = SCR_STRUCTURE(resp);
sf->scr.sd_spec = SCR_SD_SPEC(resp);
Home |
Main Index |
Thread Index |
Old Index