diff --git a/share/man/man4/cardbus.4 b/share/man/man4/cardbus.4 index dd09b4384363..eee0ac2c2c1a 100644 --- a/share/man/man4/cardbus.4 +++ b/share/man/man4/cardbus.4 @@ -1,4 +1,4 @@ -.\" $NetBSD: cardbus.4,v 1.8 2001/01/28 02:33:04 nathanw Exp $ +.\" $NetBSD: cardbus.4,v 1.9 2001/02/12 04:52:48 nathanw Exp $ .\" .\" Copyright (c) 1999-2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -44,7 +44,7 @@ .Nd CardBus driver .Sh SYNOPSIS .Cd "cbb* at pci? dev? function ?" -.Cd "cardslot* at cbb? flags 0x0000" +.Cd "cardslot* at cbb?" .Cd "cardbus* at cardslot?" .Cd "pcmcia* at cardslot?" .Cd "XX* at cardbus? dev ? function ?" @@ -67,15 +67,6 @@ or .Cm pcmcia devices, respectively. .Pp -The flags of a -.Cm cardslot -device definition determine when the device is attached. If the flag -is set to 1, card attaching will occur at slot attachment time. If the -flag is set to 0 (the default), card attaching is deferred until after -normal autoconfiguration has ended. If a card is used as a boot device -(for example, a flash memory card card or a network card), the flag should -be set to to 1. -.Pp .Sh SUPPORTED DEVICES .Nx includes the following machine-independent CardBus diff --git a/sys/dev/cardbus/cardslot.c b/sys/dev/cardbus/cardslot.c index 8faa026d3525..841d29122d50 100644 --- a/sys/dev/cardbus/cardslot.c +++ b/sys/dev/cardbus/cardslot.c @@ -1,4 +1,4 @@ -/* $NetBSD: cardslot.c,v 1.12 2001/01/28 01:49:54 nathanw Exp $ */ +/* $NetBSD: cardslot.c,v 1.13 2001/02/12 04:52:49 nathanw Exp $ */ /* * Copyright (c) 1999 and 2000 @@ -116,8 +116,6 @@ cardslotattach(parent, self, aux) struct cardbus_softc *csc; struct pcmcia_softc *psc; - int card_attach_now; - sc->sc_slot = sc->sc_dev.dv_unit; sc->sc_cb_softc = NULL; sc->sc_16_softc = NULL; @@ -155,35 +153,16 @@ cardslotattach(parent, self, aux) #endif } - card_attach_now = sc->sc_dev.dv_cfdata->cf_flags & 0x01; - if (csc && (csc->sc_cf->cardbus_ctrl)(csc->sc_cc, CARDBUS_CD)) { DPRINTF(("cardslotattach: CardBus card found\n")); - if (card_attach_now) { - if (cardbus_attach_card(sc->sc_cb_softc) > 0) { - /* at least one function works */ - CARDSLOT_SET_WORK(sc->sc_status, CARDSLOT_STATUS_WORKING); - } else { - /* no functions work or this card is not known */ - CARDSLOT_SET_WORK(sc->sc_status, CARDSLOT_STATUS_NOTWORK); - } - CARDSLOT_SET_CARDTYPE(sc->sc_status, CARDSLOT_STATUS_CARD_CB); - } else { - /* attach deferred */ - cardslot_event_throw(sc, CARDSLOT_EVENT_INSERTION_CB); - } + /* attach deferred */ + cardslot_event_throw(sc, CARDSLOT_EVENT_INSERTION_CB); } if (psc && (psc->pct->card_detect)(psc->pch)) { DPRINTF(("cardbusattach: 16-bit card found\n")); - if (card_attach_now) { - /* attach now */ - pcmcia_card_attach((struct device *)sc->sc_16_softc); - CARDSLOT_SET_CARDTYPE(sc->sc_status, CARDSLOT_STATUS_CARD_16); - } else { - /* attach deferred */ - cardslot_event_throw(sc, CARDSLOT_EVENT_INSERTION_16); - } + /* attach deferred */ + cardslot_event_throw(sc, CARDSLOT_EVENT_INSERTION_16); } }