From ff4b8c4e53ec74fe4a85086c34034bdb0dc0a9df Mon Sep 17 00:00:00 2001 From: bouyer Date: Sun, 26 Mar 2006 15:34:19 +0000 Subject: [PATCH] As we are going to sleep here, we need to use config_pending_incr()/config_pending_decr() so that disks are probed before trying to mount root, if the card is plugged in at boot time. Should fix kern/33137 by KIYOHARA Takashi. --- sys/dev/pcmcia/wdc_pcmcia.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/pcmcia/wdc_pcmcia.c b/sys/dev/pcmcia/wdc_pcmcia.c index 56fe7e582374..b4106d32e8ee 100644 --- a/sys/dev/pcmcia/wdc_pcmcia.c +++ b/sys/dev/pcmcia/wdc_pcmcia.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_pcmcia.c,v 1.104 2006/01/22 00:08:38 christos Exp $ */ +/* $NetBSD: wdc_pcmcia.c,v 1.105 2006/03/26 15:34:19 bouyer Exp $ */ /*- * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.104 2006/01/22 00:08:38 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.105 2006/03/26 15:34:19 bouyer Exp $"); #include #include @@ -318,9 +318,11 @@ wdc_pcmcia_attach(struct device *parent, struct device *self, void *aux) * and probe properly, so give them half a second. * See PR 25659 for details. */ + config_pending_incr(); tsleep(wdc_pcmcia_attach, PWAIT, "wdcattach", hz / 2); wdcattach(&sc->ata_channel); + config_pending_decr(); ata_delref(&sc->ata_channel); sc->sc_state = WDC_PCMCIA_ATTACHED; return;