summaryrefslogtreecommitdiffstats
path: root/sys/pccard
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-12-08 05:34:17 +0000
committerwpaul <wpaul@FreeBSD.org>1999-12-08 05:34:17 +0000
commit0fef0f17e23dfa33bd2e5806f5dd13042e4ff353 (patch)
tree87a61e5e0facb2cc89e0c8c164ab6e9879f9cec8 /sys/pccard
parent235e74ef14545e7100cec4fa645aff076da52816 (diff)
downloadFreeBSD-src-0fef0f17e23dfa33bd2e5806f5dd13042e4ff353.zip
FreeBSD-src-0fef0f17e23dfa33bd2e5806f5dd13042e4ff353.tar.gz
Fix alloc_driver() so that calls devclass_get_device() with slt->slotnum
as the unit argument instead of 0. disable_slot() calls devclass_get_device() correctly, however because alloc_driver() does it wrong, disable_slot() is unable to locate the child devices attached to the pccard bus and thus fails to call device_delete_child() on them. The end result is that when a card is removed, its detach routine is never called, and re-insertion always fails. With this fix (and the previous one to if_wi.c), I can now insert, remove and re-insert my WaveLAN/IEEE card and things behave correctly. kldunloading the if_wi.ko module also seems to work properly now. Ok'ed by: imp
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/pccard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 3f5d9cb..7c8d985 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -347,7 +347,7 @@ allocate_driver(struct slot *slt, struct dev_desc *desc)
int err, irq = 0;
device_t child;
- pccarddev = devclass_get_device(pccard_devclass, 0);
+ pccarddev = devclass_get_device(pccard_devclass, slt->slotnum);
irq = ffs(desc->irqmask) - 1;
MALLOC(devi, struct pccard_devinfo *, sizeof(*devi), M_DEVBUF, M_WAITOK);
bzero(devi, sizeof(*devi));
OpenPOWER on IntegriCloud