From 748745f40e2ec7403751738d8c2c5c9b0a3c38d4 Mon Sep 17 00:00:00 2001 From: imp Date: Sun, 7 Jan 2001 20:36:27 +0000 Subject: For bus_setup_intr, cookiep is a pointer to storage for the parent bus to use. We need to set it here. This fixes the problem where a probe routine establishes and disestablishes the interrupt and then we get a panic in the probe routine. However, we pass the pointer to the interrupt hanlder count to the parent bus, which writes its own cookie there, so there may be some problems with that which isn't apparent at the moment. Commit made from: laptop running NEWCARD with sn driver (which works, but gets the wrong ethernet address). --- sys/dev/pccard/pccard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/pccard') diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 2de5db0..f0f14c6 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -1026,7 +1026,7 @@ pccard_setup_intr(device_t dev, device_t child, func->intr_handler = intr; func->intr_handler_arg = arg; - func->intr_handler_cookie = cookiep; + func->intr_handler_cookie = *cookiep = func; pccard_ccr_write(func, PCCARD_CCR_OPTION, pccard_ccr_read(func, PCCARD_CCR_OPTION) | PCCARD_CCR_OPTION_IREQ_ENABLE); -- cgit v1.1