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.
This commit is contained in:
parent
a367fe98c8
commit
ff4b8c4e53
|
@ -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 <sys/cdefs.h>
|
||||
__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 <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue