diff options
author | imp <imp@FreeBSD.org> | 2001-11-26 07:14:00 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-11-26 07:14:00 +0000 |
commit | 335a26d4b8070228e4303497ddfa0d38ef16a562 (patch) | |
tree | 69a10f1b8fdec89fc57259099ad508da70ad94f2 /sys/dev/pccard/pccard.c | |
parent | fe5830e1f017ab0a55226b7a86b5b1fff72d2148 (diff) | |
download | FreeBSD-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.c | 9 |
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; |