Source-Changes-HG archive

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

[src/trunk]: src/sys Pass the device name in, so we can debug what deferred d...



details:   https://anonhg.NetBSD.org/src/rev/fc2e29884f5e
branches:  trunk
changeset: 790453:fc2e29884f5e
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Oct 12 16:49:00 2013 +0000

description:
Pass the device name in, so we can debug what deferred drivers did not work.

diffstat:

 sys/dev/ata/ata.c           |  12 ++++++------
 sys/dev/cardbus/cardslot.c  |   8 ++++----
 sys/dev/ieee1394/firewire.c |  10 +++++-----
 sys/dev/pcmcia/wdc_pcmcia.c |   8 ++++----
 sys/dev/scsipi/scsiconf.c   |   8 ++++----
 sys/dev/sdmmc/ld_sdmmc.c    |   8 ++++----
 sys/dev/sdmmc/sdmmc.c       |   8 ++++----
 sys/dev/usb/usb.c           |   8 ++++----
 sys/kern/subr_autoconf.c    |  22 ++++++++++++++--------
 sys/sys/device.h            |   6 +++---
 10 files changed, 52 insertions(+), 46 deletions(-)

diffs (truncated from 421 to 300 lines):

diff -r 166b0fe4e54a -r fc2e29884f5e sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Sat Oct 12 16:42:27 2013 +0000
+++ b/sys/dev/ata/ata.c Sat Oct 12 16:49:00 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ata.c,v 1.128 2013/08/07 12:50:17 blymn Exp $  */
+/*     $NetBSD: ata.c,v 1.129 2013/10/12 16:49:00 christos Exp $       */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.128 2013/08/07 12:50:17 blymn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.129 2013/10/12 16:49:00 christos Exp $");
 
 #include "opt_ata.h"
 
@@ -267,7 +267,7 @@
 
        ata_delref(chp);
 
-       config_pending_decr();
+       config_pending_decr(atac->atac_dev);
 }
 
 /*
@@ -394,7 +394,7 @@
 
        ata_delref(chp);
 
-       config_pending_decr();
+       config_pending_decr(atac->atac_dev);
        kthread_exit(0);
 }
 
@@ -518,7 +518,7 @@
        initq = malloc(sizeof(*initq), M_DEVBUF, M_WAITOK);
        initq->atabus_sc = sc;
        TAILQ_INSERT_TAIL(&atabus_initq_head, initq, atabus_initq);
-       config_pending_incr();
+       config_pending_incr(sc->sc_dev);
 
        if ((error = kthread_create(PRI_NONE, 0, NULL, atabus_thread, sc,
            &chp->ch_thread, "%s", device_xname(self))) != 0)
@@ -1715,7 +1715,7 @@
        initq = malloc(sizeof(*initq), M_DEVBUF, M_WAITOK);
        initq->atabus_sc = sc;
        TAILQ_INSERT_TAIL(&atabus_initq_head, initq, atabus_initq);
-       config_pending_incr();
+       config_pending_incr(sc->sc_dev);
 
        chp->ch_flags |= ATACH_TH_RESCAN;
        wakeup(&chp->ch_thread);
diff -r 166b0fe4e54a -r fc2e29884f5e sys/dev/cardbus/cardslot.c
--- a/sys/dev/cardbus/cardslot.c        Sat Oct 12 16:42:27 2013 +0000
+++ b/sys/dev/cardbus/cardslot.c        Sat Oct 12 16:49:00 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cardslot.c,v 1.54 2012/10/27 17:18:15 chs Exp $        */
+/*     $NetBSD: cardslot.c,v 1.55 2013/10/12 16:49:00 christos Exp $   */
 
 /*
  * Copyright (c) 1999 and 2000
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.54 2012/10/27 17:18:15 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.55 2013/10/12 16:49:00 christos Exp $");
 
 #include "opt_cardslot.h"
 
@@ -147,7 +147,7 @@
        }
 
        if (csc != NULL || psc != NULL) {
-               config_pending_incr();
+               config_pending_incr(self);
                if (kthread_create(PRI_NONE, 0, NULL, cardslot_event_thread,
                    sc, &sc->sc_event_thread, "%s", device_xname(self))) {
                        aprint_error_dev(sc->sc_dev,
@@ -298,7 +298,7 @@
                        splx(s);
                        if (first) {
                                first = 0;
-                               config_pending_decr();
+                               config_pending_decr(sc->sc_dev);
                        }
                        (void) tsleep(&sc->sc_events, PWAIT, "cardslotev", 0);
                        continue;
diff -r 166b0fe4e54a -r fc2e29884f5e sys/dev/ieee1394/firewire.c
--- a/sys/dev/ieee1394/firewire.c       Sat Oct 12 16:42:27 2013 +0000
+++ b/sys/dev/ieee1394/firewire.c       Sat Oct 12 16:49:00 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: firewire.c,v 1.42 2012/08/05 02:47:52 riastradh Exp $  */
+/*     $NetBSD: firewire.c,v 1.43 2013/10/12 16:49:00 christos Exp $   */
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
  * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.42 2012/08/05 02:47:52 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.43 2013/10/12 16:49:00 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -256,13 +256,13 @@
        callout_schedule(&fc->timeout_callout, hz);
 
        /* Tell config we will have started a thread to scan the bus.  */
-       config_pending_incr();
+       config_pending_incr(self);
 
        /* create thread */
        if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, fw_bus_probe_thread,
            fc, &fc->probe_thread, "fw%dprobe", device_unit(fc->bdev))) {
                aprint_error_dev(self, "kthread_create failed\n");
-               config_pending_decr();
+               config_pending_decr(self);
        }
 
        devlist = malloc(sizeof(struct firewire_dev_list), M_DEVBUF, M_NOWAIT);
@@ -1962,7 +1962,7 @@
         *              once = true;
         *      }
         */
-       config_pending_decr();
+       config_pending_decr(fc->bdev);
 
        mutex_enter(&fc->wait_lock);
        while (fc->status != FWBUSDETACH) {
diff -r 166b0fe4e54a -r fc2e29884f5e sys/dev/pcmcia/wdc_pcmcia.c
--- a/sys/dev/pcmcia/wdc_pcmcia.c       Sat Oct 12 16:42:27 2013 +0000
+++ b/sys/dev/pcmcia/wdc_pcmcia.c       Sat Oct 12 16:49:00 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc_pcmcia.c,v 1.123 2012/07/31 15:50:37 bouyer Exp $ */
+/*     $NetBSD: wdc_pcmcia.c,v 1.124 2013/10/12 16:49:01 christos 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.123 2012/07/31 15:50:37 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.124 2013/10/12 16:49:01 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -316,7 +316,7 @@
         * and probe properly, so give them half a second.
         * See PR 25659 for details.
         */
-       config_pending_incr();
+       config_pending_incr(self);
        tsleep(wdc_pcmcia_attach, PWAIT, "wdcattach", hz / 2);
 
        wdcattach(&sc->ata_channel);
@@ -324,7 +324,7 @@
        if (!pmf_device_register(self, NULL, NULL))
                aprint_error_dev(self, "unable to establish power handler\n");
 
-       config_pending_decr();
+       config_pending_decr(self);
        ata_delref(&sc->ata_channel);
        sc->sc_state = WDC_PCMCIA_ATTACHED;
        return;
diff -r 166b0fe4e54a -r fc2e29884f5e sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Sat Oct 12 16:42:27 2013 +0000
+++ b/sys/dev/scsipi/scsiconf.c Sat Oct 12 16:49:00 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.c,v 1.270 2013/09/15 13:53:51 martin Exp $    */
+/*     $NetBSD: scsiconf.c,v 1.271 2013/10/12 16:49:01 christos Exp $  */
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.270 2013/09/15 13:53:51 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.271 2013/10/12 16:49:01 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -241,7 +241,7 @@
        scsi_initq = malloc(sizeof(struct scsi_initq), M_DEVBUF, M_WAITOK);
        scsi_initq->sc_channel = chan;
        TAILQ_INSERT_TAIL(&scsi_initq_head, scsi_initq, scsi_initq);
-        config_pending_incr();
+        config_pending_incr(sc->sc_dev);
        if (scsipi_channel_init(chan)) {
                aprint_error_dev(sc->sc_dev, "failed to init channel\n");
                return;
@@ -288,7 +288,7 @@
 
        scsipi_adapter_delref(chan->chan_adapter);
 
-       config_pending_decr();
+       config_pending_decr(sc->sc_dev);
 }
 
 static int
diff -r 166b0fe4e54a -r fc2e29884f5e sys/dev/sdmmc/ld_sdmmc.c
--- a/sys/dev/sdmmc/ld_sdmmc.c  Sat Oct 12 16:42:27 2013 +0000
+++ b/sys/dev/sdmmc/ld_sdmmc.c  Sat Oct 12 16:49:00 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_sdmmc.c,v 1.11 2012/12/14 23:53:56 jakllsch Exp $   */
+/*     $NetBSD: ld_sdmmc.c,v 1.12 2013/10/12 16:49:01 christos Exp $   */
 
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.11 2012/12/14 23:53:56 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.12 2013/10/12 16:49:01 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -135,7 +135,7 @@
         * It is avoided that the error occurs when the card attaches it,
         * when wedge is supported.
         */
-       config_pending_incr();
+       config_pending_incr(self);
        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");
@@ -157,7 +157,7 @@
                    ssc->sc_busclk / 1000, ssc->sc_busclk % 1000);
        else
                aprint_normal(" %u KHz\n", ssc->sc_busclk % 1000);
-       config_pending_decr();
+       config_pending_decr(ld->sc_dv);
        kthread_exit(0);
 }
 
diff -r 166b0fe4e54a -r fc2e29884f5e sys/dev/sdmmc/sdmmc.c
--- a/sys/dev/sdmmc/sdmmc.c     Sat Oct 12 16:42:27 2013 +0000
+++ b/sys/dev/sdmmc/sdmmc.c     Sat Oct 12 16:49:00 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdmmc.c,v 1.20 2012/12/22 21:24:49 jakllsch Exp $      */
+/*     $NetBSD: sdmmc.c,v 1.21 2013/10/12 16:49:01 christos 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.20 2012/12/22 21:24:49 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.21 2013/10/12 16:49:01 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -170,7 +170,7 @@
         * Create the event thread that will attach and detach cards
         * and perform other lengthy operations.
         */
-       config_pending_incr();
+       config_pending_incr(self);
        config_interrupts(self, sdmmc_doattach);
 }
 
@@ -252,7 +252,7 @@
        struct sdmmc_task *task;
 
        sdmmc_discover_task(sc);
-       config_pending_decr();
+       config_pending_decr(sc->sc_dev);
 
        mutex_enter(&sc->sc_tskq_mtx);
        for (;;) {
diff -r 166b0fe4e54a -r fc2e29884f5e sys/dev/usb/usb.c
--- a/sys/dev/usb/usb.c Sat Oct 12 16:42:27 2013 +0000
+++ b/sys/dev/usb/usb.c Sat Oct 12 16:49:00 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb.c,v 1.144 2013/09/14 14:06:40 jakllsch Exp $       */
+/*     $NetBSD: usb.c,v 1.145 2013/10/12 16:49:01 christos Exp $       */
 
 /*
  * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.144 2013/09/14 14:06:40 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.145 2013/10/12 16:49:01 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -316,7 +316,7 @@
                sc->sc_dying = 1;
        }
 
-       config_pending_incr();



Home | Main Index | Thread Index | Old Index