Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc Revert sdmmc.c r1.18 (previous commit to this ...
details: https://anonhg.NetBSD.org/src/rev/98e5d32bfb36
branches: trunk
changeset: 783456:98e5d32bfb36
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Dec 22 20:21:09 2012 +0000
description:
Revert sdmmc.c r1.18 (previous commit to this file).
It seems to have caused regressions to detaching drivers from cards at
the appropriate time.
DETACH_FORCE to sdmmc_card_detach really means the SD/SDIO card is gone,
and can not be abused to mean that the host controller disappered.
diffstat:
sys/dev/sdmmc/sdmmc.c | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diffs (58 lines):
diff -r dd9325de70cd -r 98e5d32bfb36 sys/dev/sdmmc/sdmmc.c
--- a/sys/dev/sdmmc/sdmmc.c Sat Dec 22 20:15:22 2012 +0000
+++ b/sys/dev/sdmmc/sdmmc.c Sat Dec 22 20:21:09 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdmmc.c,v 1.18 2012/12/20 14:24:11 jakllsch Exp $ */
+/* $NetBSD: sdmmc.c,v 1.19 2012/12/22 20:21:09 jakllsch Exp $ */
/* $OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $ */
/*
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.18 2012/12/20 14:24:11 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.19 2012/12/22 20:21:09 jakllsch Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -308,7 +308,7 @@
} else {
if (ISSET(sc->sc_flags, SMF_CARD_PRESENT)) {
CLR(sc->sc_flags, SMF_CARD_PRESENT);
- sdmmc_card_detach(sc, 0);
+ sdmmc_card_detach(sc, DETACH_FORCE);
}
}
}
@@ -398,7 +398,7 @@
return;
err:
- sdmmc_card_detach(sc, 0);
+ sdmmc_card_detach(sc, DETACH_FORCE);
}
/*
@@ -415,7 +415,7 @@
if (ISSET(sc->sc_flags, SMF_CARD_ATTACHED)) {
SIMPLEQ_FOREACH(sf, &sc->sf_head, sf_list) {
if (sf->child != NULL) {
- config_detach(sf->child, flags);
+ config_detach(sf->child, DETACH_FORCE);
sf->child = NULL;
}
}
@@ -425,10 +425,8 @@
CLR(sc->sc_flags, SMF_CARD_ATTACHED);
}
- if ((flags & DETACH_FORCE) == 0) {
- /* Power down. */
- sdmmc_disable(sc);
- }
+ /* Power down. */
+ sdmmc_disable(sc);
/* Free all sdmmc_function structures. */
for (sf = SIMPLEQ_FIRST(&sc->sf_head); sf != NULL; sf = sfnext) {
Home |
Main Index |
Thread Index |
Old Index