freebsd-skq/sys/compat/ndis
wpaul 8e4107ff8f Fix some of the things I broke so that the SMC2602W (AMD Am1772) driver
works again.

This driver uses NdisScheduleWorkItem(), and we have to take special steps
to insure that its workitems don't collide with any of the other workitems
used by the NDISulator. In particular, if one of the driver's work jobs
blocks, it can prevent NdisMAllocateSharedMemoryAsync() from completing
when expected.

The original hack to fix this was to have NdisMAllocateSharedMemoryAsync()
defer its work to the DPC queue instead of the general task queue. To
fix it now, I decided to add some additional workitem threads. (There's
supposed to be a pool of worker threads in Windows anyway.) Currently,
there are 4. There should be at least 2. One is reserved for the legacy
ExQueueWorkItem() API, while the others are used in round-robin by the
IoQueueWorkItem() API. NdisMAllocateSharedMemoryAsync() uses the latter
API while NdisScheduleWorkItem() uses the former, so the deadlock is
avoided.

Fixed NdisMRegisterDevice()/NdisMDeregisterDevice() to work a little
more sensibly with the new driver_object/device_object framework. It
doesn't really register a working user-mode interface, but the existing
code was completely wrong for the new framework.

Fixed a couple of bugs dealing with the cancellation of events and
DPCs. When cancelling an event that's still on the timer queue (i.e.
hasn't expired yet), reset dh_inserted in its dispatch header to FALSE.
Previously, it was left set to TRUE, which would make a cancelled
timer appear to have not been cancelled. Also, when removing a DPC
from a queue, reset its list pointers, otherwise a cancelled DPC
might mistakenly be treated as still pending.

Lastly, fix the behavior of ntoskrnl_wakeup() when dealing with
objects that have nobody waiting on them: sync event objects get
their signalled state reset to FALSE, but notification objects
should still be set to TRUE.
2005-05-19 04:44:26 +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 Add support for NdisMEthIndicateReceive() and MiniportTransferData(). 2005-05-15 04:27:59 +00:00
kern_windrv.c More fixes for multibus drivers. When calling out to the match 2005-05-08 23:19:20 +00:00
ndis_var.h Correct some problems with workitem usage. NdisScheduleWorkItem() does 2005-05-16 15:29:21 +00:00
ntoskrnl_var.h Fix some of the things I broke so that the SMC2602W (AMD Am1772) driver 2005-05-19 04:44:26 +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 Fix support for Windows drivers that support both PCI and PCMCIA devices at 2005-05-08 23:07:51 +00:00
subr_ndis.c Fix some of the things I broke so that the SMC2602W (AMD Am1772) driver 2005-05-19 04:44:26 +00:00
subr_ntoskrnl.c Fix some of the things I broke so that the SMC2602W (AMD Am1772) driver 2005-05-19 04:44:26 +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 In winx32_wrap.S, preserve return values in the fastcall and regparm 2005-04-11 17:04:49 +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