Module Name: src
Committed By: snj
Date: Thu Mar 26 17:03:39 UTC 2009
Modified Files:
src/sys/dev/pcmcia [netbsd-5]: wdc_pcmcia.c
Log Message:
Pull up following revision(s) (requested by drochner in ticket #614):
sys/dev/pcmcia/wdc_pcmcia.c: revision 1.114
Work around a problem with PCMCIA adapter drivers (eg for hpc*) which
attach pcmcia devices before interrupts are enabled. This is unclean
because pcmcia drivers use tsleep(9) in the attach code path but it
worked all the time and it is too late to change this on the 5.0 branch.
So just tolerate it.
Fixes a regression on hpcsh reported by Valeriy E. Ushakov.
To generate a diff of this commit:
cvs rdiff -u -r1.112.8.1 -r1.112.8.2 src/sys/dev/pcmcia/wdc_pcmcia.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/pcmcia/wdc_pcmcia.c
diff -u src/sys/dev/pcmcia/wdc_pcmcia.c:1.112.8.1 src/sys/dev/pcmcia/wdc_pcmcia.c:1.112.8.2
--- src/sys/dev/pcmcia/wdc_pcmcia.c:1.112.8.1 Wed Feb 18 00:23:09 2009
+++ src/sys/dev/pcmcia/wdc_pcmcia.c Thu Mar 26 17:03:39 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_pcmcia.c,v 1.112.8.1 2009/02/18 00:23:09 snj Exp $ */
+/* $NetBSD: wdc_pcmcia.c,v 1.112.8.2 2009/03/26 17:03:39 snj Exp $ */
/*-
* Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.112.8.1 2009/02/18 00:23:09 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.112.8.2 2009/03/26 17:03:39 snj Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -352,8 +352,19 @@
struct wdc_pcmcia_softc *sc = device_private(self);
int error;
+#if 1
+ /*
+ * XXX temporary kludge: we need to allow enabling while (cold)
+ * for some hpc* ports which attach pcmcia devices too early.
+ * This is problematic because pcmcia code uses tsleep() in
+ * the attach code path, but it seems to work somehow.
+ */
+ if (doing_shutdown)
+ return (EIO);
+#else
if (cold || doing_shutdown)
return (EIO);
+#endif
if (onoff) {
/* Establish the interrupt handler. */