Module Name: src
Committed By: tsutsui
Date: Fri Jan 27 14:28:33 UTC 2012
Modified Files:
src/sys/dev/sdmmc: ld_sdmmc.c
Log Message:
Protect ldattach ops with config_pending_intr(9)/config_pending_decr(9)
so that "boot device: ld0" detection works properly even on slower zaurus.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/sdmmc/ld_sdmmc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/sdmmc/ld_sdmmc.c
diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.7 src/sys/dev/sdmmc/ld_sdmmc.c:1.8
--- src/sys/dev/sdmmc/ld_sdmmc.c:1.7 Sat Nov 13 13:52:11 2010
+++ src/sys/dev/sdmmc/ld_sdmmc.c Fri Jan 27 14:28:33 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ld_sdmmc.c,v 1.7 2010/11/13 13:52:11 uebayasi Exp $ */
+/* $NetBSD: ld_sdmmc.c,v 1.8 2012/01/27 14:28:33 tsutsui Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.7 2010/11/13 13:52:11 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.8 2012/01/27 14:28:33 tsutsui Exp $");
#include "rnd.h"
@@ -133,6 +133,7 @@ ld_sdmmc_attach(device_t parent, device_
* It is avoided that the error occurs when the card attaches it,
* when wedge is supported.
*/
+ config_pending_incr();
if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL,
ld_sdmmc_doattach, sc, &lwp, "%sattach", device_xname(self))) {
aprint_error_dev(self, "couldn't create thread\n");
@@ -154,6 +155,7 @@ ld_sdmmc_doattach(void *arg)
ssc->sc_busclk / 1000, ssc->sc_busclk % 1000);
else
aprint_normal(" %u KHz\n", ssc->sc_busclk % 1000);
+ config_pending_decr();
kthread_exit(0);
}