Date: Mon, 22 Dec 2008 12:27:50 GMT From: Weongyo Jeong <weongyo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 155116 for review Message-ID: <200812221227.mBMCRoQZ052142@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=155116 Change 155116 by weongyo@weongyo_ws on 2008/12/22 12:27:13 implement ndis_pnpevent_nic() function to support MiniportPnpEventNotify() method. Currently it'd be used at USB detaching by NDIS_PNP_EVENT_SURPRISE_REMOVED. While I'm here add a missed prototype. Affected files ... .. //depot/projects/ndisusb/sys/compat/ndis/kern_ndis.c#8 edit .. //depot/projects/ndisusb/sys/compat/ndis/ndis_var.h#3 edit Differences ... ==== //depot/projects/ndisusb/sys/compat/ndis/kern_ndis.c#8 (text+ko) ==== @@ -1225,6 +1225,31 @@ } int +ndis_pnpevent_nic(arg, type) + void *arg; + int type; +{ + struct ndis_softc *sc; + ndis_handle adapter; + ndis_pnpevent_handler pnpeventfunc; + + sc = arg; + NDIS_LOCK(sc); + adapter = sc->ndis_block->nmb_miniportadapterctx; + pnpeventfunc = sc->ndis_chars->nmc_pnpevent_handler; + NDIS_UNLOCK(sc); + if (adapter == NULL || pnpeventfunc == NULL) + return(EIO); + + if (sc->ndis_chars->nmc_rsvd0 == NULL) + MSCALL4(pnpeventfunc, adapter, type, NULL, 0); + else + MSCALL4(pnpeventfunc, sc->ndis_chars->nmc_rsvd0, type, NULL, 0); + + return (0); +} + +int ndis_init_nic(arg) void *arg; { ==== //depot/projects/ndisusb/sys/compat/ndis/ndis_var.h#3 (text+ko) ==== @@ -1658,6 +1658,7 @@ typedef void (*ndis_enable_interrupts_handler)(ndis_handle); typedef void (*ndis_disable_interrupts_handler)(ndis_handle); typedef void (*ndis_shutdown_handler)(void *); +typedef void (*ndis_pnpevent_handler)(void *, int, void *, uint32_t); typedef void (*ndis_allocdone_handler)(ndis_handle, void *, ndis_physaddr *, uint32_t, void *); typedef uint8_t (*ndis_checkforhang_handler)(ndis_handle); @@ -1739,6 +1740,7 @@ extern int ndis_reset_nic(void *); extern int ndis_halt_nic(void *); extern int ndis_shutdown_nic(void *); +extern int ndis_pnpevent_nic(void *, int); extern int ndis_init_nic(void *); extern void ndis_return_packet(void *, void *); extern int ndis_init_dma(void *); @@ -1759,6 +1761,7 @@ extern void NdisFreePacket(ndis_packet *); extern ndis_status NdisScheduleWorkItem(ndis_work_item *); extern void NdisMSleep(uint32_t); +extern void ndis_cancel_timerlist(void); __END_DECLS #endif /* _NDIS_VAR_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812221227.mBMCRoQZ052142>