NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/40531 (5.0_BETA/i386 doesn't power off on Dell Latitude X1 with CF card plugged in)



Could you please try the appended patch instead? It keeps the
changes to the release branch at a minimum and is thus
preferrable from a release engineering POV.
The real problem is that pcmcia code generally assumes
that it is called from a thread context (eg use of tsleep)
but some hpc* adapter drivers attach pcmcia devices
while cold. The adapter drivers should be fixed asap,
and this is only a workaround for the NetBSD-5 release
branch.

best regards
Matthias





-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
#
# old_revision [bab0b1ab2a648f4d8137692280cb79c6e74e3b6f]
#
# patch "sys/dev/pcmcia/wdc_pcmcia.c"
#  from [686d05986232809158ac5468c475dc71b137f561]
#    to [18429cc2cc6fcfcb4e1ba324ec34c562469a6e9b]
#
============================================================
--- sys/dev/pcmcia/wdc_pcmcia.c 686d05986232809158ac5468c475dc71b137f561
+++ sys/dev/pcmcia/wdc_pcmcia.c 18429cc2cc6fcfcb4e1ba324ec34c562469a6e9b
@@ -352,8 +352,19 @@ wdc_pcmcia_enable(struct device *self, i
        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. */


Home | Main Index | Thread Index | Old Index