ReactOS 0.4.16-dev-336-gb667d82
nvnet.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS nVidia nForce Ethernet Controller Driver
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Common header file
5 * COPYRIGHT: Copyright 2021-2022 Dmitry Borisov <di.sean@protonmail.com>
6 */
7
8#ifndef _NVNET_PCH_
9#define _NVNET_PCH_
10
11#if !DBG
12#define NO_KERNEL_LIST_ENTRY_CHECKS
13#endif
14#include <ndis.h>
15
16#include <section_attribs.h>
17
18#include "eth.h"
19#include "nic.h"
20#include "phyreg.h"
21
22#define NVNET_TAG 'ENVN'
23
24#if defined(SARCH_XBOX)
25/* Reduce memory requirements on OG Xbox */
26#define NVNET_TRANSMIT_BLOCKS 8
27#define NVNET_TRANSMIT_DESCRIPTORS 32
28#define NVNET_TRANSMIT_BUFFERS 1
29#define NVNET_RECEIVE_DESCRIPTORS 16
30#else
31#define NVNET_TRANSMIT_BLOCKS 64
32#define NVNET_TRANSMIT_DESCRIPTORS 512
33#define NVNET_TRANSMIT_BUFFERS 16
34#define NVNET_RECEIVE_DESCRIPTORS 512
35#endif
36
37#define NVNET_ALIGNMENT 64
38
39#define NVNET_RECEIVE_BUFFER_SIZE 2048
40
41#define NVNET_RECEIVE_PROCESSING_LIMIT 64
42
43#define NVNET_IM_THRESHOLD 4
44#define NVNET_IM_MAX_IDLE 40
45
46#if defined(SARCH_XBOX)
47#define NVNET_TRANSMIT_HANG_THRESHOLD 3
48#else
49#define NVNET_TRANSMIT_HANG_THRESHOLD 5
50#endif
51
52#if defined(SARCH_XBOX)
53#define NVNET_FRAGMENTATION_THRESHOLD 8
54#else
55#define NVNET_FRAGMENTATION_THRESHOLD 32
56#endif
57
58#define NVNET_MEDIA_DETECTION_INTERVAL 5000
59
60#define NVNET_MAXIMUM_FRAME_SIZE 1514
61#define NVNET_MAXIMUM_FRAME_SIZE_JUMBO 9014
62#define NVNET_MAXIMUM_VLAN_ID 0xFFF
63
64#define NVNET_MULTICAST_LIST_SIZE 32
65
66#define NVNET_MINIMUM_LSO_SEGMENT_COUNT 2
67#define NVNET_MAXIMUM_LSO_FRAME_SIZE 0xFC00
68
69#define NVNET_PACKET_FILTERS ( \
70 NDIS_PACKET_TYPE_DIRECTED | \
71 NDIS_PACKET_TYPE_MULTICAST | \
72 NDIS_PACKET_TYPE_BROADCAST | \
73 NDIS_PACKET_TYPE_PROMISCUOUS | \
74 NDIS_PACKET_TYPE_ALL_MULTICAST)
75
76#define PACKET_ENTRY(Packet) ((PLIST_ENTRY)(&(Packet)->MiniportReserved[0]))
77
79{
84
86{
93
94typedef union _NVNET_OFFLOAD
95{
96 struct {
102
108
113
118 };
121
122typedef struct _NVNET_STATISTICS
123{
154
170
173
174typedef struct _NVNET_WAKE_FRAME
175{
176 union
177 {
183
185{
189
190typedef struct _NVNET_TX_BUFFER
191{
196
197typedef union _NVNET_TBD
198{
203
204typedef struct _NVNET_TCB
205{
212#define NV_TCB_LARGE_SEND 0x00000001
213#define NV_TCB_CHECKSUM_IP 0x00000002
214#define NV_TCB_CHECKSUM_TCP 0x00000004
215#define NV_TCB_CHECKSUM_UDP 0x00000008
216#define NV_TCB_COALESCE 0x00000010
217
220
221typedef union _NV_RBD
222{
227
228typedef struct _NVNET_RBD
229{
234
235typedef struct _NVNET_SEND
236{
252
253typedef struct _NVNET_RECEIVE
254{
258
260
261typedef VOID
263 _In_ PNVNET_ADAPTER Adapter,
264 _In_ PNVNET_TCB Tcb,
267
268typedef ULONG
270 _In_ PNVNET_ADAPTER Adapter,
271 _Inout_ PLIST_ENTRY SendReadyList);
273
274typedef ULONG
276 _In_ PNVNET_ADAPTER Adapter,
277 _In_ ULONG TotalRxProcessed);
279
280typedef struct _NVNET_ADAPTER
281{
282 volatile PUCHAR IoBase;
286#define NV_ACTIVE 0x80000000
287#define NV_SEND_CHECKSUM 0x00000002
288#define NV_SEND_LARGE_SEND 0x00000004
289#define NV_SEND_ERRATA_PRESENT 0x00000008
290
291#define NV_MAC_IN_USE 0x00000010
292#define NV_GIGABIT_PHY 0x00000020
293#define NV_UNIT_SEMAPHORE_ACQUIRED 0x00000040
294#define NV_USE_SOFT_MAC_ADDRESS 0x00000100
295#define NV_FORCE_SPEED_AND_DUPLEX 0x00000200
296#define NV_FORCE_FULL_DUPLEX 0x00000400
297#define NV_USER_SPEED_100 0x00000800
298#define NV_PACKET_PRIORITY 0x00001000
299#define NV_VLAN_TAGGING 0x00002000
300
311
315
318
330
336
340
342 ULONG MulticastListSize;
343 struct
344 {
347
350
352
355
357 volatile LONG ResetLock;
358
361
364
367
373
377
386
387#define NvNetLogError(Adapter, ErrorCode) \
388 NdisWriteErrorLogEntry((Adapter)->AdapterHandle, ErrorCode, 1, __LINE__)
389
395
396CODE_SEG("PAGE")
398NTAPI
402 _In_ PNDIS_MEDIUM MediumArray,
406
407CODE_SEG("PAGE")
408VOID
410 _In_ PNVNET_ADAPTER Adapter);
411
412CODE_SEG("PAGE")
415 _Inout_ PNVNET_ADAPTER Adapter);
416
417CODE_SEG("PAGE")
420 _Inout_ PNVNET_ADAPTER Adapter,
422
423CODE_SEG("PAGE")
424VOID
426 _In_ PNVNET_ADAPTER Adapter,
428
429CODE_SEG("PAGE")
432 _In_ PNVNET_ADAPTER Adapter,
433 _In_ BOOLEAN InitPhy);
434
435CODE_SEG("PAGE")
438 _In_ PNVNET_ADAPTER Adapter);
439
440CODE_SEG("PAGE")
443 _In_ PNVNET_ADAPTER Adapter);
444
445VOID
447 _In_ PNVNET_ADAPTER Adapter);
448
449CODE_SEG("PAGE")
450VOID
452 _In_ PNVNET_ADAPTER Adapter);
453
455VOID
457 _In_ PNVNET_ADAPTER Adapter);
458
459CODE_SEG("PAGE")
460VOID
462 _In_ PNVNET_ADAPTER Adapter);
463
464CODE_SEG("PAGE")
465VOID
467 _In_ PNVNET_ADAPTER Adapter,
468 _In_ NDIS_STATUS CompleteStatus);
469
470KSYNCHRONIZE_ROUTINE NvNetInitPhaseSynchronized;
471NDIS_TIMER_FUNCTION NvNetMediaDetectionDpc;
472
475 _In_ PNVNET_ADAPTER Adapter,
476 _In_ ULONG PhyAddress,
477 _In_ ULONG RegAddress,
478 _In_ ULONG Data);
479
481MiiRead(
482 _In_ PNVNET_ADAPTER Adapter,
483 _In_ ULONG PhyAddress,
484 _In_ ULONG RegAddress,
486
489 _In_ PNVNET_ADAPTER Adapter);
490
491VOID
493 _In_ PNVNET_ADAPTER Adapter);
494
495VOID
497 _In_ PNVNET_ADAPTER Adapter);
498
499VOID
501 _In_ PNVNET_ADAPTER Adapter);
502
503VOID
505 _In_ PNVNET_ADAPTER Adapter);
506
507VOID
509 _In_ PNVNET_ADAPTER Adapter);
510
511CODE_SEG("PAGE")
512VOID
514 _In_ PNVNET_ADAPTER Adapter,
515 _In_ BOOLEAN ClearPhyControl);
516
517VOID
519 _Inout_ PNVNET_ADAPTER Adapter,
520 _In_ ULONG PauseFlags);
521
522VOID
524 _In_ PNVNET_ADAPTER Adapter,
525 _In_ BOOLEAN Gate);
526
527VOID
529 _In_ PNVNET_ADAPTER Adapter,
530 _In_ NDIS_DEVICE_POWER_STATE NewPowerState,
531 _In_ ULONG WakeFlags);
532
533CODE_SEG("PAGE")
534VOID
536 _In_ PNVNET_ADAPTER Adapter);
537
538VOID
540 _In_ PNVNET_ADAPTER Adapter);
541
542VOID
544 _In_ PNVNET_ADAPTER Adapter);
545
547NTAPI
549 _In_ NDIS_HANDLE MiniportAdapterContext,
551 _In_ UINT Flags);
552
553VOID
554NTAPI
556 _Out_ PBOOLEAN InterruptRecognized,
557 _Out_ PBOOLEAN QueueMiniportHandleInterrupt,
558 _In_ NDIS_HANDLE MiniportAdapterContext);
559
560VOID
561NTAPI
563 _In_ NDIS_HANDLE MiniportAdapterContext);
564
566NTAPI
568 _In_ NDIS_HANDLE MiniportAdapterContext,
569 _In_ NDIS_OID Oid,
570 _In_ PVOID InformationBuffer,
571 _In_ ULONG InformationBufferLength,
573 _Out_ PULONG BytesNeeded);
574
576NTAPI
578 _In_ NDIS_HANDLE MiniportAdapterContext,
579 _In_ NDIS_OID Oid,
580 _In_ PVOID InformationBuffer,
581 _In_ ULONG InformationBufferLength,
583 _Out_ PULONG BytesNeeded);
584
585#define NV_IMPLICIT_ENTRIES(Length) \
586 (((Length - (NV_MAXIMUM_SG_SIZE + 1)) >> NV_TX2_TSO_MAX_SHIFT) + 1)
587
589VOID
591 _In_ PNVNET_ADAPTER Adapter,
592 _In_ PNVNET_TCB Tcb)
593{
594 if (Tcb->Flags & NV_TCB_COALESCE)
595 {
596 PushEntryList(&Adapter->Send.BufferList, &Tcb->Buffer->Link);
597 }
598
599 Tcb->Packet = NULL;
600
601 ++Adapter->Send.TcbSlots;
602
603 Adapter->Send.TbdSlots += Tcb->Slots;
604
605 Adapter->Send.StuckCount = 0;
606}
607
611 _In_ PNVNET_ADAPTER Adapter,
612 _In_ PNVNET_TCB Tcb)
613{
614 if (Tcb++ == Adapter->Send.TailTcb)
615 return Adapter->Send.HeadTcb;
616 else
617 return Tcb;
618}
619
623 _In_ PNVNET_ADAPTER Adapter,
624 _In_ NVNET_TBD Tbd)
625{
626 if (Tbd.x32++ == Adapter->Send.TailTbd.x32)
627 return Adapter->Send.HeadTbd;
628 else
629 return Tbd;
630}
631
635 _In_ PNVNET_ADAPTER Adapter,
636 _In_ NVNET_TBD Tbd)
637{
638 if (Tbd.x64++ == Adapter->Send.TailTbd.x64)
639 return Adapter->Send.HeadTbd;
640 else
641 return Tbd;
642}
643
645VOID
647 _In_ PNVNET_ADAPTER Adapter,
650{
651 NdisWriteRegisterUlong((PULONG)(Adapter->IoBase + Register), Value);
652}
653
655ULONG
657 _In_ PNVNET_ADAPTER Adapter,
659{
660 ULONG Value;
661
662 NdisReadRegisterUlong((PULONG)(Adapter->IoBase + Register), &Value);
663 return Value;
664}
665
666#define NvNetDisableInterrupts(Adapter) \
667 NV_WRITE(Adapter, NvRegIrqMask, 0);
668
669#define NvNetApplyInterruptMask(Adapter) \
670 NV_WRITE(Adapter, NvRegIrqMask, (Adapter)->InterruptMask);
671
672#endif /* _NVNET_PCH_ */
#define CODE_SEG(...)
unsigned char BOOLEAN
#define VOID
Definition: acefi.h:82
#define _Interlocked_
#define NULL
Definition: types.h:112
#define ETH_LENGTH_OF_ADDRESS
Definition: efilter.h:16
unsigned __int64 ULONG64
Definition: imports.h:198
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1549
unsigned int * PUINT
Definition: ndis.h:50
unsigned int UINT
Definition: ndis.h:50
#define NdisReadRegisterUlong(Register, Data)
Definition: ndis.h:4267
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT SelectedMediumIndex
Definition: ndis.h:6011
MDL * PNDIS_BUFFER
Definition: ndis.h:343
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT MediumArraySize
Definition: ndis.h:6013
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _In_ NDIS_HANDLE WrapperConfigurationContext
Definition: ndis.h:3946
_In_ NDIS_HANDLE MiniportAdapterHandle
Definition: ndis.h:4668
#define NdisWriteRegisterUlong(Register, Data)
Definition: ndis.h:4294
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS OpenErrorStatus
Definition: ndis.h:6009
* PNDIS_STATUS
Definition: ndis.h:45
#define _In_reads_bytes_(s)
Definition: no_sal2.h:170
#define _Inout_
Definition: no_sal2.h:162
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _Out_writes_bytes_all_(s)
Definition: no_sal2.h:194
#define DECLSPEC_NOINLINE
Definition: ntbasedef.h:225
enum _NDIS_DEVICE_POWER_STATE NDIS_DEVICE_POWER_STATE
enum _NDIS_MEDIUM * PNDIS_MEDIUM
int NDIS_STATUS
Definition: ntddndis.h:475
ULONG NDIS_OID
Definition: ntddndis.h:230
#define NV_WAKEUPPATTERNS_V2
Definition: nic.h:466
enum _NVNET_REGISTER NVNET_REGISTER
FORCEINLINE NVNET_TBD NV_NEXT_TBD_64(_In_ PNVNET_ADAPTER Adapter, _In_ NVNET_TBD Tbd)
Definition: nvnet.h:634
#define NV_TCB_COALESCE
Definition: nvnet.h:216
ULONG() NVNET_PROCESS_TRANSMIT(_In_ PNVNET_ADAPTER Adapter, _Inout_ PLIST_ENTRY SendReadyList)
Definition: nvnet.h:269
BOOLEAN MiiRead(_In_ PNVNET_ADAPTER Adapter, _In_ ULONG PhyAddress, _In_ ULONG RegAddress, _Out_ PULONG Data)
Definition: phy.c:62
struct _NVNET_TCB NVNET_TCB
struct _NVNET_STATISTICS * PNVNET_STATISTICS
VOID NvNetStartTransmitter(_In_ PNVNET_ADAPTER Adapter)
Definition: nic.c:130
#define NVNET_MULTICAST_LIST_SIZE
Definition: nvnet.h:64
struct _NVNET_RECEIVE * PNVNET_RECEIVE
VOID NvNetFlushTransmitQueue(_In_ PNVNET_ADAPTER Adapter, _In_ NDIS_STATUS CompleteStatus)
Definition: nvnet.c:24
VOID NvNetFreeAdapter(_In_ PNVNET_ADAPTER Adapter)
Definition: init.c:595
VOID SidebandUnitReleaseSemaphore(_In_ PNVNET_ADAPTER Adapter)
Definition: phy.c:667
NDIS_STATUS NvNetRecognizeHardware(_Inout_ PNVNET_ADAPTER Adapter)
Definition: nic.c:675
NVNET_PROCESS_TRANSMIT ProcessTransmitDescriptorsLegacy
Definition: nvnet.h:392
NVNET_PROCESS_TRANSMIT ProcessTransmitDescriptors64
Definition: nvnet.h:394
VOID NvNetSetPowerState(_In_ PNVNET_ADAPTER Adapter, _In_ NDIS_DEVICE_POWER_STATE NewPowerState, _In_ ULONG WakeFlags)
Definition: requests.c:500
NVNET_TRANSMIT_PACKET NvNetTransmitPacket64
Definition: nvnet.h:391
FORCEINLINE NVNET_TBD NV_NEXT_TBD_32(_In_ PNVNET_ADAPTER Adapter, _In_ NVNET_TBD Tbd)
Definition: nvnet.h:622
ULONG() NVNET_PROCESS_RECEIVE(_In_ PNVNET_ADAPTER Adapter, _In_ ULONG TotalRxProcessed)
Definition: nvnet.h:275
_NVNET_OPTIMIZATION_MODE
Definition: nvnet.h:79
@ NV_OPTIMIZATION_MODE_CPU
Definition: nvnet.h:81
@ NV_OPTIMIZATION_MODE_DYNAMIC
Definition: nvnet.h:80
@ NV_OPTIMIZATION_MODE_THROUGHPUT
Definition: nvnet.h:82
KSYNCHRONIZE_ROUTINE NvNetInitPhaseSynchronized
Definition: nvnet.h:470
VOID NvNetStartReceiver(_In_ PNVNET_ADAPTER Adapter)
Definition: nic.c:104
VOID NvNetSetupMacAddress(_In_ PNVNET_ADAPTER Adapter, _In_reads_bytes_(ETH_LENGTH_OF_ADDRESS) PUCHAR MacAddress)
Definition: nic.c:622
VOID NvNetStopReceiver(_In_ PNVNET_ADAPTER Adapter)
Definition: nic.c:147
struct _NVNET_SEND * PNVNET_SEND
_NVNET_FLOW_CONTROL_MODE
Definition: nvnet.h:86
@ NV_FLOW_CONTROL_RX
Definition: nvnet.h:89
@ NV_FLOW_CONTROL_AUTO
Definition: nvnet.h:88
@ NV_FLOW_CONTROL_TX
Definition: nvnet.h:90
@ NV_FLOW_CONTROL_DISABLE
Definition: nvnet.h:87
@ NV_FLOW_CONTROL_RX_TX
Definition: nvnet.h:91
VOID NvNetToggleClockPowerGating(_In_ PNVNET_ADAPTER Adapter, _In_ BOOLEAN Gate)
Definition: nic.c:294
struct _NVNET_ADAPTER NVNET_ADAPTER
Definition: nvnet.h:259
DECLSPEC_NOINLINE VOID NvNetPauseProcessing(_In_ PNVNET_ADAPTER Adapter)
Definition: nvnet.c:46
NDIS_STATUS NvNetFindPhyDevice(_In_ PNVNET_ADAPTER Adapter)
struct _NVNET_WAKE_FRAME * PNVNET_WAKE_FRAME
VOID NvNetResetReceiverAndTransmitter(_In_ PNVNET_ADAPTER Adapter)
Definition: nic.c:91
VOID NTAPI MiniportHandleInterrupt(_In_ NDIS_HANDLE MiniportAdapterContext)
Definition: interrupt.c:449
VOID NvNetIdleTransmitter(_In_ PNVNET_ADAPTER Adapter, _In_ BOOLEAN ClearPhyControl)
Definition: nic.c:211
struct _NVNET_TX_BUFFER * PNVNET_TX_BUFFER
FORCEINLINE VOID NV_RELEASE_TCB(_In_ PNVNET_ADAPTER Adapter, _In_ PNVNET_TCB Tcb)
Definition: nvnet.h:590
BOOLEAN NvNetUpdateLinkSpeed(_In_ PNVNET_ADAPTER Adapter)
Definition: phy.c:990
VOID NvNetBackoffSetSlotTime(_In_ PNVNET_ADAPTER Adapter)
Definition: backoff.c:58
NDIS_STATUS NvNetInitNIC(_In_ PNVNET_ADAPTER Adapter, _In_ BOOLEAN InitPhy)
Definition: nic.c:401
NVNET_PROCESS_TRANSMIT ProcessTransmitDescriptors32
Definition: nvnet.h:393
struct _NVNET_RBD NVNET_RBD
struct _NVNET_ADAPTER * PNVNET_ADAPTER
Definition: nvnet.h:259
VOID NvNetStopAdapter(_In_ PNVNET_ADAPTER Adapter)
Definition: nvnet.c:58
union _NVNET_OFFLOAD NVNET_OFFLOAD
enum _NVNET_OPTIMIZATION_MODE NVNET_OPTIMIZATION_MODE
struct _NVNET_STATISTICS NVNET_STATISTICS
NDIS_STATUS NvNetGetPermanentMacAddress(_Inout_ PNVNET_ADAPTER Adapter, _Out_writes_bytes_all_(ETH_LENGTH_OF_ADDRESS) PUCHAR MacAddress)
Definition: nic.c:541
union _NVNET_TBD NVNET_TBD
NDIS_STATUS NTAPI MiniportInitialize(_Out_ PNDIS_STATUS OpenErrorStatus, _Out_ PUINT SelectedMediumIndex, _In_ PNDIS_MEDIUM MediumArray, _In_ UINT MediumArraySize, _In_ NDIS_HANDLE MiniportAdapterHandle, _In_ NDIS_HANDLE WrapperConfigurationContext)
Definition: init.c:700
struct _NVNET_SEND NVNET_SEND
VOID NvNetStartAdapter(_In_ PNVNET_ADAPTER Adapter)
Definition: nvnet.c:74
enum _NVNET_FLOW_CONTROL_MODE NVNET_FLOW_CONTROL_MODE
NDIS_TIMER_FUNCTION NvNetMediaDetectionDpc
Definition: nvnet.h:471
struct _NVNET_TX_BUFFER_DATA NVNET_TX_BUFFER_DATA
struct _NVNET_TX_BUFFER_DATA * PNVNET_TX_BUFFER_DATA
NDIS_STATUS NTAPI MiniportSend(_In_ NDIS_HANDLE MiniportAdapterContext, _In_ PNDIS_PACKET Packet, _In_ UINT Flags)
Definition: send.c:49
VOID() NVNET_TRANSMIT_PACKET(_In_ PNVNET_ADAPTER Adapter, _In_ PNVNET_TCB Tcb, _In_ PSCATTER_GATHER_LIST SgList)
Definition: nvnet.h:262
union _NVNET_OFFLOAD * PNVNET_OFFLOAD
NVNET_TRANSMIT_PACKET * PNVNET_TRANSMIT_PACKET
Definition: nvnet.h:266
VOID NvNetBackoffReseed(_In_ PNVNET_ADAPTER Adapter)
Definition: backoff.c:91
NDIS_STATUS NTAPI MiniportQueryInformation(_In_ NDIS_HANDLE MiniportAdapterContext, _In_ NDIS_OID Oid, _In_ PVOID InformationBuffer, _In_ ULONG InformationBufferLength, _Out_ PULONG BytesWritten, _Out_ PULONG BytesNeeded)
Definition: requests.c:973
NVNET_PROCESS_TRANSMIT * PNVNET_PROCESS_TRANSMIT
Definition: nvnet.h:272
VOID NvNetBackoffReseedEx(_In_ PNVNET_ADAPTER Adapter)
Definition: backoff.c:125
struct _NVNET_TX_BUFFER NVNET_TX_BUFFER
struct _NVNET_RECEIVE NVNET_RECEIVE
struct _NVNET_RBD * PNVNET_RBD
NVNET_TRANSMIT_PACKET NvNetTransmitPacket32
Definition: nvnet.h:390
union _NV_RBD NV_RBD
struct _NVNET_WAKE_FRAME NVNET_WAKE_FRAME
FORCEINLINE VOID NV_WRITE(_In_ PNVNET_ADAPTER Adapter, _In_ NVNET_REGISTER Register, _In_ ULONG Value)
Definition: nvnet.h:646
FORCEINLINE ULONG NV_READ(_In_ PNVNET_ADAPTER Adapter, _In_ NVNET_REGISTER Register)
Definition: nvnet.h:656
NVNET_PROCESS_RECEIVE * PNVNET_PROCESS_RECEIVE
Definition: nvnet.h:278
VOID NTAPI MiniportISR(_Out_ PBOOLEAN InterruptRecognized, _Out_ PBOOLEAN QueueMiniportHandleInterrupt, _In_ NDIS_HANDLE MiniportAdapterContext)
Definition: interrupt.c:518
struct _NVNET_TCB * PNVNET_TCB
VOID NvNetStopTransmitter(_In_ PNVNET_ADAPTER Adapter)
Definition: nic.c:178
VOID NvNetUpdatePauseFrame(_Inout_ PNVNET_ADAPTER Adapter, _In_ ULONG PauseFlags)
Definition: nic.c:242
BOOLEAN MiiWrite(_In_ PNVNET_ADAPTER Adapter, _In_ ULONG PhyAddress, _In_ ULONG RegAddress, _In_ ULONG Data)
Definition: phy.c:26
FORCEINLINE PNVNET_TCB NV_NEXT_TCB(_In_ PNVNET_ADAPTER Adapter, _In_ PNVNET_TCB Tcb)
Definition: nvnet.h:610
NDIS_STATUS NvNetPhyInit(_In_ PNVNET_ADAPTER Adapter)
Definition: phy.c:1036
#define NVNET_TRANSMIT_BUFFERS
Definition: nvnet.h:33
NDIS_STATUS NTAPI MiniportSetInformation(_In_ NDIS_HANDLE MiniportAdapterContext, _In_ NDIS_OID Oid, _In_ PVOID InformationBuffer, _In_ ULONG InformationBufferLength, _Out_ PULONG BytesRead, _Out_ PULONG BytesNeeded)
Definition: requests.c:1282
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
Definition: typedefs.h:120
_Interlocked_ volatile LONG ResetLock
Definition: nvnet.h:357
UCHAR PermanentMacAddress[ETH_LENGTH_OF_ADDRESS]
Definition: nvnet.h:338
NDIS_PHYSICAL_ADDRESS IoAddress
Definition: nvnet.h:359
ULONG IpHeaderOffset
Definition: nvnet.h:308
ULONG MaximumFrameSize
Definition: nvnet.h:321
PVOID TbdOriginal
Definition: nvnet.h:379
ULONG WakeFlags
Definition: nvnet.h:324
ULONG ReceiveBufferSize
Definition: nvnet.h:322
PNVNET_TRANSMIT_PACKET TransmitPacket
Definition: nvnet.h:316
BOOLEAN Connected
Definition: nvnet.h:334
NDIS_PHYSICAL_ADDRESS RbdPhys
Definition: nvnet.h:375
ULONG Features
Definition: nvnet.h:284
ULONG PhyAddress
Definition: nvnet.h:325
USHORT DeviceId
Definition: nvnet.h:365
ULONG PacketFilter
Definition: nvnet.h:309
NDIS_WORK_ITEM PowerWorkItem
Definition: nvnet.h:353
BOOLEAN InterruptShared
Definition: nvnet.h:368
ULONG Flags
Definition: nvnet.h:285
ULONG WakeFrameBitmap
Definition: nvnet.h:348
ULONG InterruptLevel
Definition: nvnet.h:371
ULONG OriginalMacAddress[2]
Definition: nvnet.h:337
ULONG VlanControl
Definition: nvnet.h:331
NVNET_TX_BUFFER_DATA SendBufferAllocationData[NVNET_TRANSMIT_BUFFERS]
Definition: nvnet.h:384
ULONG InterruptFlags
Definition: nvnet.h:372
ULONG VlanId
Definition: nvnet.h:323
NVNET_FLOW_CONTROL_MODE FlowControlMode
Definition: nvnet.h:362
PUCHAR ReceiveBuffer
Definition: nvnet.h:313
UCHAR MacAddress[ETH_LENGTH_OF_ADDRESS]
Definition: nvnet.h:345
UCHAR RevisionId
Definition: nvnet.h:366
ULONG LinkSpeed
Definition: nvnet.h:333
PVOID AdapterOriginal
Definition: nvnet.h:381
NDIS_MINIPORT_INTERRUPT Interrupt
Definition: nvnet.h:369
BOOLEAN FullDuplex
Definition: nvnet.h:335
NDIS_PHYSICAL_ADDRESS TbdPhys
Definition: nvnet.h:374
ULONG InterruptVector
Definition: nvnet.h:370
PNVNET_WAKE_FRAME WakeFrames[NV_WAKEUPPATTERNS_V2]
Definition: nvnet.h:349
ULONG PauseFlags
Definition: nvnet.h:332
NVNET_SEND Send
Definition: nvnet.h:310
ULONG AdapterStatus
Definition: nvnet.h:305
NVNET_OFFLOAD Offload
Definition: nvnet.h:307
ULONG PhyRevision
Definition: nvnet.h:327
ULONG InterruptStatus
Definition: nvnet.h:303
NVNET_OPTIMIZATION_MODE OptimizationMode
Definition: nvnet.h:306
ULONG TxRxControl
Definition: nvnet.h:301
ULONG PhyModel
Definition: nvnet.h:326
NDIS_MINIPORT_TIMER MediaDetectionTimer
Definition: nvnet.h:363
NDIS_PHYSICAL_ADDRESS RbdPhysOriginal
Definition: nvnet.h:383
NDIS_PHYSICAL_ADDRESS ReceiveBufferPhys
Definition: nvnet.h:376
ULONG IoLength
Definition: nvnet.h:360
PVOID SendBuffer
Definition: nvnet.h:378
struct _NVNET_ADAPTER::@1013 MulticastList[NVNET_MULTICAST_LIST_SIZE]
volatile PUCHAR IoBase
Definition: nvnet.h:282
NDIS_HANDLE AdapterHandle
Definition: nvnet.h:283
NDIS_PHYSICAL_ADDRESS TbdPhysOriginal
Definition: nvnet.h:382
ULONG CurrentRx
Definition: nvnet.h:314
NDIS_WORK_ITEM ResetWorkItem
Definition: nvnet.h:354
ULONG InterruptIdleCount
Definition: nvnet.h:304
NVNET_STATISTICS Statistics
Definition: nvnet.h:319
NDIS_SPIN_LOCK Lock
Definition: nvnet.h:320
NVNET_RECEIVE Receive
Definition: nvnet.h:312
UCHAR CurrentMacAddress[ETH_LENGTH_OF_ADDRESS]
Definition: nvnet.h:339
_Field_range_(0, NVNET_MULTICAST_LIST_SIZE) ULONG MulticastListSize
ULONG PowerStatePending
Definition: nvnet.h:329
ULONG InterruptMask
Definition: nvnet.h:302
ULONG PhyOui
Definition: nvnet.h:328
PVOID RbdOriginal
Definition: nvnet.h:380
NDIS_HANDLE WrapperConfigurationHandle
Definition: nvnet.h:351
PNVNET_PROCESS_TRANSMIT ProcessTransmit
Definition: nvnet.h:317
PNDIS_PACKET Packet
Definition: nvnet.h:231
PNDIS_BUFFER Buffer
Definition: nvnet.h:232
NV_RBD NvRbd
Definition: nvnet.h:230
NDIS_SPIN_LOCK Lock
Definition: nvnet.h:255
NV_RBD NvRbd
Definition: nvnet.h:256
PNVNET_TCB HeadTcb
Definition: nvnet.h:238
PNVNET_TCB CurrentTcb
Definition: nvnet.h:241
PNVNET_TCB TailTcb
Definition: nvnet.h:239
PNVNET_TCB DeferredTcb
Definition: nvnet.h:242
NDIS_SPIN_LOCK Lock
Definition: nvnet.h:237
NVNET_TBD CurrentTbd
Definition: nvnet.h:245
ULONG TbdSlots
Definition: nvnet.h:247
NVNET_TBD TailTbd
Definition: nvnet.h:244
ULONG TcbSlots
Definition: nvnet.h:246
PNVNET_TCB LastTcb
Definition: nvnet.h:240
NVNET_TBD HeadTbd
Definition: nvnet.h:243
ULONG StuckCount
Definition: nvnet.h:248
ULONG PacketsCount
Definition: nvnet.h:249
SINGLE_LIST_ENTRY BufferList
Definition: nvnet.h:250
ULONG64 HwTxLossCarrier
Definition: nvnet.h:130
ULONG64 HwRxLateCol
Definition: nvnet.h:135
ULONG64 TransmitOneRetry
Definition: nvnet.h:167
ULONG64 HwTxUnderflow
Definition: nvnet.h:129
ULONG64 HwTxLateCol
Definition: nvnet.h:128
ULONG ReceiveIrqNoBuffers
Definition: nvnet.h:171
ULONG64 HwTxFrame
Definition: nvnet.h:143
ULONG64 HwTxRetryErr
Definition: nvnet.h:132
ULONG64 TransmitExcessiveCollisions
Definition: nvnet.h:163
ULONG64 HwRxExtraByte
Definition: nvnet.h:134
ULONG64 TransmitZeroRetry
Definition: nvnet.h:166
ULONG64 TransmitOk
Definition: nvnet.h:155
ULONG64 ReceiveNoBuffers
Definition: nvnet.h:159
ULONG64 HwRxRunt
Definition: nvnet.h:136
ULONG64 ReceiveAlignmentErrors
Definition: nvnet.h:161
ULONG64 HwTxOneReXmt
Definition: nvnet.h:126
ULONG64 ReceiveCrcErrors
Definition: nvnet.h:160
ULONG64 HwRxPause
Definition: nvnet.h:146
ULONG64 TransmitLateCollisions
Definition: nvnet.h:169
ULONG64 HwRxFCSErr
Definition: nvnet.h:139
ULONG64 TransmitDeferred
Definition: nvnet.h:162
ULONG64 TransmitLostCarrierSense
Definition: nvnet.h:168
ULONG64 HwRxOverflow
Definition: nvnet.h:138
ULONG64 HwRxFrameTooLong
Definition: nvnet.h:137
ULONG64 HwRxDropFrame
Definition: nvnet.h:147
ULONG64 HwRxLenErr
Definition: nvnet.h:141
ULONG64 HwRxBroadcast
Definition: nvnet.h:150
ULONG64 ReceiveOk
Definition: nvnet.h:156
ULONG64 HwTxMulticast
Definition: nvnet.h:152
ULONG64 HwRxUnicast
Definition: nvnet.h:148
ULONG64 HwTxBroadcast
Definition: nvnet.h:153
ULONG64 HwRxFrameAlignErr
Definition: nvnet.h:140
ULONG64 HwTxPause
Definition: nvnet.h:145
ULONG64 HwRxFrameErr
Definition: nvnet.h:133
ULONG64 HwTxExcessDef
Definition: nvnet.h:131
ULONG64 HwTxManyReXmt
Definition: nvnet.h:127
ULONG64 HwTxCnt
Definition: nvnet.h:124
ULONG64 ReceiveErrors
Definition: nvnet.h:158
ULONG64 HwRxCnt
Definition: nvnet.h:144
ULONG64 HwRxMulticast
Definition: nvnet.h:149
ULONG64 HwTxUnicast
Definition: nvnet.h:151
ULONG64 ReceiveOverrunErrors
Definition: nvnet.h:164
ULONG64 HwTxZeroReXmt
Definition: nvnet.h:125
ULONG64 HwTxDef
Definition: nvnet.h:142
ULONG64 TransmitUnderrunErrors
Definition: nvnet.h:165
ULONG64 TransmitErrors
Definition: nvnet.h:157
PNVNET_TX_BUFFER Buffer
Definition: nvnet.h:209
ULONG Slots
Definition: nvnet.h:210
NVNET_TBD Tbd
Definition: nvnet.h:206
NVNET_TBD DeferredTbd
Definition: nvnet.h:207
ULONG Mss
Definition: nvnet.h:218
ULONG Flags
Definition: nvnet.h:211
PNDIS_PACKET Packet
Definition: nvnet.h:208
NDIS_PHYSICAL_ADDRESS PhysicalAddress
Definition: nvnet.h:187
PVOID VirtualAddress
Definition: nvnet.h:186
PVOID VirtualAddress
Definition: nvnet.h:193
NDIS_PHYSICAL_ADDRESS PhysicalAddress
Definition: nvnet.h:194
SINGLE_LIST_ENTRY Link
Definition: nvnet.h:192
union _NVNET_WAKE_FRAME::@1012 PatternMask
UCHAR AsUCHAR[16]
Definition: nvnet.h:178
UCHAR WakeUpPattern[128]
Definition: nvnet.h:181
ULONG AsULONG[4]
Definition: nvnet.h:179
Definition: ntbasedef.h:636
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * PBOOLEAN
Definition: typedefs.h:53
#define NTAPI
Definition: typedefs.h:36
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
ULONG SendTcpChecksum
Definition: nvnet.h:99
ULONG ReceiveTcpChecksum
Definition: nvnet.h:105
ULONG ReceiveTcpV6Checksum
Definition: nvnet.h:116
ULONG SendTcpV6Options
Definition: nvnet.h:110
ULONG ReceiveUdpChecksum
Definition: nvnet.h:106
ULONG SendIpChecksum
Definition: nvnet.h:101
ULONG ReceiveUdpV6Checksum
Definition: nvnet.h:117
ULONG ReceiveTcpOptions
Definition: nvnet.h:104
ULONG SendUdpChecksum
Definition: nvnet.h:100
ULONG ReceiveIpChecksum
Definition: nvnet.h:107
ULONG ReceiveIpOptions
Definition: nvnet.h:103
ULONG ReceiveIpV6Options
Definition: nvnet.h:114
ULONG SendTcpV6Checksum
Definition: nvnet.h:111
ULONG SendUdpV6Checksum
Definition: nvnet.h:112
ULONG Value
Definition: nvnet.h:119
ULONG SendIpV6Options
Definition: nvnet.h:109
ULONG SendTcpOptions
Definition: nvnet.h:98
ULONG ReceiveTcpV6Options
Definition: nvnet.h:115
ULONG SendIpOptions
Definition: nvnet.h:97
PVOID Memory
Definition: nvnet.h:201
PNVNET_DESCRIPTOR_32 x32
Definition: nvnet.h:199
PNVNET_DESCRIPTOR_64 x64
Definition: nvnet.h:200
Definition: nvnet.h:222
PNVNET_DESCRIPTOR_32 x32
Definition: nvnet.h:223
PVOID Memory
Definition: nvnet.h:225
PNVNET_DESCRIPTOR_64 x64
Definition: nvnet.h:224
WDF_EXTERN_C_START typedef _In_ WDFDEVICE _In_ WDFCONTEXT _In_ WDF_DMA_DIRECTION _In_ PSCATTER_GATHER_LIST SgList
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
Definition: wdfiotarget.h:960
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
Definition: wdfiotarget.h:870
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
#define FORCEINLINE
Definition: wdftypes.h:67
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
struct _SCATTER_GATHER_LIST * PSCATTER_GATHER_LIST
Definition: iotypes.h:2204
FORCEINLINE VOID PushEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PSINGLE_LIST_ENTRY Entry)
Definition: rtlfuncs.h:256
unsigned char UCHAR
Definition: xmlstorage.h:181