Commit graph

184 commits

Author SHA1 Message Date
Cameron Gutman
72f9da2665 - Protect MiniportBusy with a spin lock
- Adapter is PLOGICAL_ADAPTER not PNDIS_MINIPORT_BLOCK
 - Make sure memory allocation was successful
 - Cleanup code in ProRequest

svn path=/branches/aicom-network-fixes/; revision=36556
2008-09-27 19:00:47 +00:00
Cameron Gutman
a4c5f0d79c - Call ResetHandler directly
svn path=/branches/aicom-network-fixes/; revision=36552
2008-09-27 18:30:11 +00:00
Cameron Gutman
9826b2ad04 - Queue a work item in MiniReset if the adapter is currently busy
- Handle NdisWorkItemResetRequested in MiniportWorker
 - Remove a fixme

svn path=/branches/aicom-network-fixes/; revision=36551
2008-09-27 18:00:08 +00:00
Cameron Gutman
337a43d553 - Remove dead code
- Fixes coverity error 85

svn path=/branches/aicom-network-fixes/; revision=36538
2008-09-26 18:10:50 +00:00
Cameron Gutman
82e25f4548 - Fix a typo
- Fixes coverity error 388

svn path=/branches/aicom-network-fixes/; revision=36528
2008-09-26 03:43:07 +00:00
Cameron Gutman
0820ee7a4e - Return early if there aren't any packets to be sent
- Fixes coverity error 458

svn path=/branches/aicom-network-fixes/; revision=36527
2008-09-26 03:35:56 +00:00
Cameron Gutman
d8398cc719 - Fail if From is NULL
- Fixes Coverity error 652

svn path=/branches/aicom-network-fixes/; revision=36524
2008-09-26 03:03:55 +00:00
Cameron Gutman
975e8109a2 - Don't call NdisMSendComplete in MiniportSend
svn path=/branches/aicom-network-fixes/; revision=36501
2008-09-25 03:23:15 +00:00
Cameron Gutman
2f05ba10c9 - Created a dummy nic driver for testing purposes
- Still a work in progress

svn path=/branches/aicom-network-fixes/; revision=36500
2008-09-25 01:02:08 +00:00
Cameron Gutman
df2275e5e3 - Add a debug print
svn path=/branches/aicom-network-fixes/; revision=36496
2008-09-24 22:00:02 +00:00
Cameron Gutman
b4f76ec0bb - MiniportAdapterHandle is PLOGICAL_ADAPTER not PNDIS_MINIPORT_BLOCK
svn path=/branches/aicom-network-fixes/; revision=36495
2008-09-24 21:56:07 +00:00
Cameron Gutman
23c2ae170f - Use timers so the code is much more simple and works better
svn path=/branches/aicom-network-fixes/; revision=36442
2008-09-23 23:59:43 +00:00
Cameron Gutman
0cabe4ffdb - Check for miniport hangs at the appropriate time
- Call MiniReset if required

svn path=/branches/aicom-network-fixes/; revision=36441
2008-09-23 20:54:02 +00:00
Cameron Gutman
be3ff9cec9 - Uncomment the stubbed CheckForHang handler
svn path=/branches/aicom-network-fixes/; revision=36440
2008-09-23 20:48:43 +00:00
Cameron Gutman
63c5133b1c - Set CheckForHangSeconds to a default value of 2 if it wasn't set in MiniportInitialize
svn path=/branches/aicom-network-fixes/; revision=36438
2008-09-23 20:17:59 +00:00
Cameron Gutman
2d8a1d38bb - Set CheckForHangSeconds
svn path=/branches/aicom-network-fixes/; revision=36437
2008-09-23 20:10:35 +00:00
Cameron Gutman
8f1a94b39b - Call the CheckForHang handler at DISPATCH_LEVEL
- Implement MiniReset

svn path=/branches/aicom-network-fixes/; revision=36433
2008-09-23 18:44:17 +00:00
Cameron Gutman
faa10907ca - Implement MiniCheckForHang
svn path=/branches/aicom-network-fixes/; revision=36432
2008-09-23 18:24:19 +00:00
Cameron Gutman
274d2f50e8 - We must check that NdisWrapperHandle is non-NULL to see if NdisMInitializeWrapper succeeded
svn path=/branches/aicom-network-fixes/; revision=36430
2008-09-23 18:07:26 +00:00
Cameron Gutman
521d849d25 - Add some IRQL checks for ne2000 like those in r36406
svn path=/branches/aicom-network-fixes/; revision=36408
2008-09-23 04:53:59 +00:00
Cameron Gutman
751bd9fb71 - Change NdisAcquireSpinLock to NdisDprAcquireSpinLock because we are running at DISPATCH_LEVEL
svn path=/branches/aicom-network-fixes/; revision=36407
2008-09-23 04:39:31 +00:00
Cameron Gutman
be9e073137 - Add some IRQL checks
- Fix some comments

svn path=/branches/aicom-network-fixes/; revision=36406
2008-09-23 04:29:30 +00:00
Cameron Gutman
e6330c4049 - Set the InFlightRequest to NULL when we complete
svn path=/branches/aicom-network-fixes/; revision=36381
2008-09-21 14:40:28 +00:00
Cameron Gutman
86e1d71934 - There are 4 in flight requests not 3
svn path=/branches/aicom-network-fixes/; revision=36371
2008-09-21 12:31:14 +00:00
Cameron Gutman
24402d079c - Remove more useless code
svn path=/branches/aicom-network-fixes/; revision=36364
2008-09-21 03:21:34 +00:00
Cameron Gutman
252f7c71da - Set MiniportBusy to TRUE in MiniDequeueWorkItem instead of MiniQueueWorkItem
- Fail if another miniport request is still in progress

svn path=/branches/aicom-network-fixes/; revision=36363
2008-09-21 02:35:23 +00:00
Cameron Gutman
e6386dff73 - Remove some unneeded code
- Set MiniportBusy to TRUE if MiniDoRequest returns NDIS_STATUS_PENDING

svn path=/branches/aicom-network-fixes/; revision=36362
2008-09-21 01:55:16 +00:00
Cameron Gutman
36a831e55c - Only call MiniSendComplete if ProIndicatePacket didn't return NDIS_STATUS_PENDING
svn path=/branches/aicom-network-fixes/; revision=36359
2008-09-20 23:08:56 +00:00
Cameron Gutman
08288ba535 - Revert r36337 because the callers don't depend on the memory being zeroed
svn path=/branches/aicom-network-fixes/; revision=36358
2008-09-20 21:29:31 +00:00
Cameron Gutman
b7872654ed - The handle passed to MiniRequestComplete, NdisMQueryInformationComplete, and NdisMSetInformationComplete is the Adapter not the MiniportBlock
- Set MiniportBusy to FALSE in all the completion routines
 - Set MiniportBusy to TRUE in MiniQueueWorkItem
 - Only requeue the packet if it's a serialized miniport that returned NDIS_STATUS_RESOURCES
 - Hold the spin lock when requeuing the packet

svn path=/branches/aicom-network-fixes/; revision=36356
2008-09-20 17:10:30 +00:00
Cameron Gutman
5faf248d96 - Zero the memory after we allocate it
svn path=/branches/aicom-network-fixes/; revision=36337
2008-09-20 00:31:02 +00:00
Cameron Gutman
d8dfacc28d - Queue the packet again if we currently don't have enough resources to process it
svn path=/branches/aicom-network-fixes/; revision=36336
2008-09-19 23:51:26 +00:00
Cameron Gutman
5620a8ecff - Initialize the callback record before calling KeRegisterBugCheckCallback so NdisMRegisterAdapterShutdownHandler should work now
svn path=/branches/aicom-network-fixes/; revision=36335
2008-09-19 23:41:28 +00:00
Cameron Gutman
face815dd6 - Code cleanup
- Set Status to NDIS_STATUS_NOT_SUPPORTED if we don't support the parameter type

svn path=/branches/aicom-network-fixes/; revision=36334
2008-09-19 23:18:12 +00:00
Cameron Gutman
f0e952b4b6 - Store the current thread
svn path=/branches/aicom-network-fixes/; revision=36333
2008-09-19 23:16:29 +00:00
Cameron Gutman
0b7d92c4b3 - Fail if TCPSocket doesn't complete successfully
svn path=/branches/aicom-network-fixes/; revision=36311
2008-09-19 04:38:25 +00:00
Cameron Gutman
249fa88dd2 - Add the adapter to the adapter list only after it is bound to the IP layer
svn path=/branches/aicom-network-fixes/; revision=36310
2008-09-19 04:18:59 +00:00
Cameron Gutman
340fdfa3ff - Add the spin locks back that I removed
svn path=/branches/aicom-network-fixes/; revision=36256
2008-09-15 12:54:53 +00:00
Cameron Gutman
cfcc5a1f53 - Queue a work item for all packets
- Now I can add the spin locks back that I removed

svn path=/branches/aicom-network-fixes/; revision=36255
2008-09-15 12:44:16 +00:00
Cameron Gutman
72d8191116 - Use NDIS_GET_PACKET_STATUS to get the real status for the packet
- Set MiniportBusy to FALSE if Send/SendPacket didn't return NDIS_STATUS_PENDING

svn path=/branches/aicom-network-fixes/; revision=36250
2008-09-14 21:17:44 +00:00
Cameron Gutman
20165883fc - Merge r35555, r35575, r35576, and r36243 into my branch
svn path=/branches/aicom-network-fixes/; revision=36248
2008-09-14 20:01:36 +00:00
Cameron Gutman
3c6651a64e - Call a serialized miniport's Send/SendPackets handler at DISPATCH_LEVEL
svn path=/branches/aicom-network-fixes/; revision=36212
2008-09-14 05:30:06 +00:00
Cameron Gutman
91ac8bce6e - Change our method of queuing work items so we don't leak anymore
svn path=/branches/aicom-network-fixes/; revision=36211
2008-09-14 05:16:32 +00:00
Cameron Gutman
ac40a36ce9 - Queue a work item to do our work that was previously done in MiniportDpc so SendHandler gets called at the correct IRQL
svn path=/branches/aicom-network-fixes/; revision=36206
2008-09-14 04:02:04 +00:00
Cameron Gutman
86ca4446aa - Call KeAcquireSpinLockAtDpcLevel instead of KeAcquireSpinLock when possible
- Don't hold the spin lock as long in MiniportDpc

svn path=/branches/aicom-network-fixes/; revision=36198
2008-09-13 19:00:32 +00:00
Cameron Gutman
bd9013b5ae - Read the maximum packets that the driver allows to be sent at one time
- We don't use it yet

svn path=/branches/aicom-network-fixes/; revision=36195
2008-09-13 18:33:16 +00:00
Cameron Gutman
e1800f7c53 - unimplemented -> implemented
svn path=/branches/aicom-network-fixes/; revision=36193
2008-09-13 17:07:30 +00:00
Cameron Gutman
70f9713881 - Implement NdisDprFreePacket
- Implement NdisDprFreePacketNonInterlocked

svn path=/branches/aicom-network-fixes/; revision=36192
2008-09-13 16:40:45 +00:00
Cameron Gutman
8bea43b223 - Implement NdisDprAllocatePacketNonInterlocked
svn path=/branches/aicom-network-fixes/; revision=36191
2008-09-13 16:36:43 +00:00
Cameron Gutman
08c2fa4ccb - Implement NdisDprAllocatePacket
svn path=/branches/aicom-network-fixes/; revision=36190
2008-09-13 16:33:23 +00:00