freebsd-dev/sys/compat/ndis
Bill Paul a3ced67adf Another round of cleanups and fixes:
- Change ndis_return() from a DPC to a workitem so that it doesn't
  run at DISPATCH_LEVEL (with the dispatcher lock held).

- In if_ndis.c, submit packets to the stack via (*ifp->if_input)() in
  a workitem instead of doing it directly in ndis_rxeof(), because
  ndis_rxeof() runs in a DPC, and hence at DISPATCH_LEVEL. This
  implies that the 'dispatch level' mutex for the current CPU is
  being held, and we don't want to call if_input while holding
  any locks.

- Reimplement IoConnectInterrupt()/IoDisconnectInterrupt(). The original
  approach I used to track down the interrupt resource (by scanning
  the device tree starting at the nexus) is prone to problems when
  two devices share an interrupt. (E.g removing ndis1 might disable
  interrupts for ndis0.) The new approach is to multiplex all the
  NDIS interrupts through a common internal dispatcher (ntoskrnl_intr())
  and allow IoConnectInterrupt()/IoDisconnectInterrupt() to add or
  remove interrupts from the dispatch list.

- Implement KeAcquireInterruptSpinLock() and KeReleaseInterruptSpinLock().

- Change the DPC and workitem threads to use the KeXXXSpinLock
  API instead of mtx_lock_spin()/mtx_unlock_spin().

- Simplify the NdisXXXPacket routines by creating an actual
  packet pool structure and using the InterlockedSList routines
  to manage the packet queue.

- Only honor the value returned by OID_GEN_MAXIMUM_SEND_PACKETS
  for serialized drivers. For deserialized drivers, we now create
  a packet array of 64 entries. (The Microsoft DDK documentation
  says that for deserialized miniports, OID_GEN_MAXIMUM_SEND_PACKETS
  is ignored, and the driver for the Marvell 8335 chip, which is
  a deserialized miniport, returns 1 when queried.)

- Clean up timer handling in subr_ntoskrnl.

- Add the following conditional debugging code:
	NTOSKRNL_DEBUG_TIMERS - add debugging and stats for timers
	NDIS_DEBUG_PACKETS - add extra sanity checking for NdisXXXPacket API
	NTOSKRNL_DEBUG_SPINLOCKS - add test for spinning too long

- In kern_ndis.c, always start the HAL first and shut it down last,
  since Windows spinlocks depend on it. Ntoskrnl should similarly be
  started second and shut down next to last.
2005-10-18 19:52:15 +00:00
..
cfg_var.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
hal_var.h Create new i386 windows/bsd thunking layer, similar to the amd64 thunking 2005-04-11 02:02:35 +00:00
kern_ndis.c Another round of cleanups and fixes: 2005-10-18 19:52:15 +00:00
kern_windrv.c This commit makes a big round of updates and fixes many, many things. 2005-10-10 16:46:39 +00:00
ndis_var.h Another round of cleanups and fixes: 2005-10-18 19:52:15 +00:00
ntoskrnl_var.h Another round of cleanups and fixes: 2005-10-18 19:52:15 +00:00
pe_var.h Create new i386 windows/bsd thunking layer, similar to the amd64 thunking 2005-04-11 02:02:35 +00:00
resource_var.h Add support for Windows/x86-64 binaries to Project Evil. 2005-02-16 05:41:18 +00:00
subr_hal.c This commit makes a big round of updates and fixes many, many things. 2005-10-10 16:46:39 +00:00
subr_ndis.c Another round of cleanups and fixes: 2005-10-18 19:52:15 +00:00
subr_ntoskrnl.c Another round of cleanups and fixes: 2005-10-18 19:52:15 +00:00
subr_pe.c Couple of lessons learned during USB driver testing: 2005-02-24 17:58:27 +00:00
subr_usbd.c This commit makes a bunch of changes, some big, some not so big. 2005-05-05 03:56:09 +00:00
usbd_var.h - Correct one aspect of the driver_object/device_object/IRP framework: 2005-02-24 21:49:14 +00:00
winx32_wrap.S This commit makes a big round of updates and fixes many, many things. 2005-10-10 16:46:39 +00:00
winx64_wrap.S When setting up the new stack for a function in x86_64_wrap(), make 2005-04-16 04:47:15 +00:00