summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccard/pccard.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-11-26 07:14:00 +0000
committerimp <imp@FreeBSD.org>2001-11-26 07:14:00 +0000
commit335a26d4b8070228e4303497ddfa0d38ef16a562 (patch)
tree69a10f1b8fdec89fc57259099ad508da70ad94f2 /sys/dev/pccard/pccard.c
parentfe5830e1f017ab0a55226b7a86b5b1fff72d2148 (diff)
downloadFreeBSD-src-335a26d4b8070228e4303497ddfa0d38ef16a562.zip
FreeBSD-src-335a26d4b8070228e4303497ddfa0d38ef16a562.tar.gz
Only call pccard_function_disable when we have a configured config
entry. Otherwise we panic on boot for cards that we can't allocate a config entry for (my 3.3V wavelan card currently fails thusly).
Diffstat (limited to 'sys/dev/pccard/pccard.c')
-rw-r--r--sys/dev/pccard/pccard.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index a482e95..4612b40 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -223,7 +223,8 @@ pccard_attach_card(device_t dev)
pccard_ccr_read(pf, 0x0C), pccard_ccr_read(pf, 0x0E),
pccard_ccr_read(pf, 0x10), pccard_ccr_read(pf, 0x12)));
} else {
- pccard_function_disable(pf);
+ if (pf->cfe != NULL)
+ pccard_function_disable(pf);
}
}
if (sc->sc_enabled_count == 0)
@@ -247,7 +248,8 @@ pccard_detach_card(device_t dev, int flags)
if (state == DS_ATTACHED || state == DS_BUSY)
device_detach(pf->dev);
- pccard_function_disable(pf);
+ if (pf->cfe != NULL)
+ pccard_function_disable(pf);
pccard_function_free(pf);
if (pf->dev != NULL)
device_delete_child(dev, pf->dev);
@@ -1010,7 +1012,8 @@ pccard_driver_added(device_t dev, driver_t *driver)
pccard_ccr_read(pf, 0x0C), pccard_ccr_read(pf, 0x0E),
pccard_ccr_read(pf, 0x10), pccard_ccr_read(pf, 0x12)));
} else {
- pccard_function_disable(pf);
+ if (pf->cfe != NULL)
+ pccard_function_disable(pf);
}
}
return;
OpenPOWER on IntegriCloud