svn commit: r186509 - head/sys/compat/ndis
Weongyo Jeong
weongyo at FreeBSD.org
Sat Dec 27 09:42:18 UTC 2008
Author: weongyo
Date: Sat Dec 27 09:42:17 2008
New Revision: 186509
URL: http://svn.freebsd.org/changeset/base/186509
Log:
fix a bug to handling the argument that it passed `device_t' but it's
handled as `struct ndis_softc'. It'll cause a panic when the driver is
detached.
Modified:
head/sys/compat/ndis/kern_ndis.c
Modified: head/sys/compat/ndis/kern_ndis.c
==============================================================================
--- head/sys/compat/ndis/kern_ndis.c Sat Dec 27 09:36:22 2008 (r186508)
+++ head/sys/compat/ndis/kern_ndis.c Sat Dec 27 09:42:17 2008 (r186509)
@@ -1205,11 +1205,13 @@ ndis_pnpevent_nic(arg, type)
void *arg;
int type;
{
+ device_t dev;
struct ndis_softc *sc;
ndis_handle adapter;
ndis_pnpevent_handler pnpeventfunc;
- sc = arg;
+ dev = arg;
+ sc = device_get_softc(arg);
NDIS_LOCK(sc);
adapter = sc->ndis_block->nmb_miniportadapterctx;
pnpeventfunc = sc->ndis_chars->nmc_pnpevent_handler;
More information about the svn-src-all
mailing list