#include "dc21x4.h"
#include <debug.h>
Go to the source code of this file.
|
static VOID | MiiMdioPacket (_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG Sequence, _In_ ULONG BitCount) |
|
static ULONG | MiiMdioShiftIn (_In_ PDC21X4_ADAPTER Adapter) |
|
static VOID | MiiMdioClearExtraBits (_In_ PDC21X4_ADAPTER Adapter) |
|
BOOLEAN | MiiWrite (_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG PhyAddress, _In_ ULONG RegAddress, _In_ ULONG Data) |
|
BOOLEAN | MiiRead (_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG PhyAddress, _In_ ULONG RegAddress, _Out_ PULONG Data) |
|
static VOID | HpnaSpiClose (_In_ PDC21X4_ADAPTER Adapter) |
|
static VOID | HpnaSpiShiftOut (_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG Sequence, _In_ ULONG BitCount) |
|
static VOID | HpnaWrite (_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG RegAddress, _In_ ULONG Data) |
|
VOID | HpnaPhyInit (_In_ PDC21X4_ADAPTER Adapter) |
|
BOOLEAN | DcFindMiiPhy (_In_ PDC21X4_ADAPTER Adapter) |
|
◆ MII_READ
Value: do { \
NdisStallExecution(2); \
} while (0)
FORCEINLINE ULONG DC_READ(_In_ PDC21X4_ADAPTER Adapter, _In_ DC_CSR Register)
Definition at line 16 of file phy.c.
◆ MII_WRITE
Value: do { \
NdisStallExecution(2); \
} while (0)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition at line 22 of file phy.c.
◆ DcFindMiiPhy()
Definition at line 217 of file phy.c.
219{
221
223
224
226 {
229#if DBG
230 ULONG PhyIdLow, PhyIdHigh, MiiControl, MiiAdvertise;
231#endif
232
233
234
235
236
238 continue;
239 if (MiiStatus == 0xFFFF || MiiStatus == 0)
240 continue;
241
242#if DBG
247
248 INFO_VERB(
"Found PHY at address %u: ID %04lx:%04lx, Ctrl %04lx, Status %04lx, Adv %04lx\n",
249 PhyAddress,
250 PhyIdLow,
251 PhyIdHigh,
252 MiiControl,
253 MiiStatus,
254 MiiAdvertise);
255#endif
256
257 Adapter->PhyAddress = PhyAddress;
258
260 }
261
263}
BOOLEAN MiiRead(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG PhyAddress, _In_ ULONG RegAddress, _Out_ PULONG Data)
#define MII_MAX_PHY_ADDRESSES
#define MII_AUTONEG_ADVERTISE
Referenced by DcInitialize().
◆ HpnaPhyInit()
Definition at line 194 of file phy.c.
196{
198
200
201
205
207 {
208 if (Adapter->HpnaInitBitmap & (1 <<
i))
209 {
211 }
212 }
213}
static VOID HpnaWrite(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG RegAddress, _In_ ULONG Data)
#define DC_WRITE(Adapter, Register, Value)
@ DcCsr13_SiaConnectivity
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Referenced by DcSetupAdapter().
◆ HpnaSpiClose()
◆ HpnaSpiShiftOut()
Definition at line 147 of file phy.c.
151{
153
155
158
159 for (
i = BitCount - 1;
i >= 0; --
i)
160 {
162
165 }
166
169}
#define DC_SERIAL_SPI_DI_SHIFT
Referenced by HpnaWrite().
◆ HpnaWrite()
Definition at line 174 of file phy.c.
178{
180
183
186 (RegAddress << 8) |
190}
static VOID HpnaSpiShiftOut(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG Sequence, _In_ ULONG BitCount)
static VOID HpnaSpiClose(_In_ PDC21X4_ADAPTER Adapter)
#define DC_SPI_BYTE_WRITE_OPERATION
#define DC_SPI_SET_WRITE_ENABLE
#define RTL_BITS_OF(sizeOfArg)
Referenced by HpnaPhyInit().
◆ MiiMdioClearExtraBits()
Definition at line 70 of file phy.c.
72{
75}
#define MII_WRITE(Adapter, Value)
#define DC_SERIAL_MII_MDC
#define DC_SERIAL_MII_MII
Referenced by MiiRead(), and MiiWrite().
◆ MiiMdioPacket()
Definition at line 32 of file phy.c.
36{
38
39 for (
i = BitCount - 1;
i >= 0; --
i)
40 {
42
45 }
46}
#define DC_SERIAL_MII_MDO_SHIFT
Referenced by MiiRead(), and MiiWrite().
◆ MiiMdioShiftIn()
Definition at line 50 of file phy.c.
52{
55
57 {
60
63 }
64
66}
#define MII_READ(Adapter, Data)
#define DC_SERIAL_MII_MDI_SHIFT
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Referenced by MiiRead().
◆ MiiRead()
Definition at line 101 of file phy.c.
106{
109
114 (PhyAddress << 5) |
115 RegAddress,
116 14);
117
118
120
123
125
126
128
130}
static VOID MiiMdioClearExtraBits(_In_ PDC21X4_ADAPTER Adapter)
static ULONG MiiMdioShiftIn(_In_ PDC21X4_ADAPTER Adapter)
static VOID MiiMdioPacket(_In_ PDC21X4_ADAPTER Adapter, _In_ ULONG Sequence, _In_ ULONG BitCount)
#define DC_SERIAL_MII_MDI
Referenced by DcFindMiiPhy(), FindPhyDevice(), MediaMiiCheckLink(), MediaMiiGetSpeedAndDuplex(), MediaMiiSelect(), MiiGetSpeedAndDuplex(), NvNetInitNIC(), NvNetPhyInit(), NvNetSetSpeedAndDuplex(), PhyInit(), PhyInitCicadaSemiconductor(), PhyInitRealtek8201(), PhyInitRealtek8211c(), PhyInitVitesseSemiconductor(), and PhyReset().
◆ MiiWrite()