summaryrefslogtreecommitdiff
path: root/drivers/net/bcm570x_lm.h
blob: 2ea6ca8fa9c5a116f9930ac2762a262d410e124e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434

/******************************************************************************/
/*                                                                            */
/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 Broadcom         */
/* Corporation.                                                               */
/* All rights reserved.                                                       */
/*                                                                            */
/* This program is free software; you can redistribute it and/or modify       */
/* it under the terms of the GNU General Public License as published by       */
/* the Free Software Foundation, located in the file LICENSE.                 */
/*                                                                            */
/* History:                                                                   */
/*    02/25/00 Hav Khauv        Initial version.                              */
/******************************************************************************/

#ifndef LM_H
#define LM_H

#include "bcm570x_queue.h"
#include "bcm570x_bits.h"

/******************************************************************************/
/* Basic types. */
/******************************************************************************/

typedef char LM_CHAR, *PLM_CHAR;
typedef unsigned int LM_UINT, *PLM_UINT;
typedef unsigned char LM_UINT8, *PLM_UINT8;
typedef unsigned short LM_UINT16, *PLM_UINT16;
typedef unsigned int LM_UINT32, *PLM_UINT32;
typedef unsigned int LM_COUNTER, *PLM_COUNTER;
typedef void LM_VOID, *PLM_VOID;
typedef char LM_BOOL, *PLM_BOOL;

/* 64bit value. */
typedef struct {
#ifdef BIG_ENDIAN_HOST
	LM_UINT32 High;
	LM_UINT32 Low;
#else				/* BIG_ENDIAN_HOST */
	LM_UINT32 Low;
	LM_UINT32 High;
#endif				/* !BIG_ENDIAN_HOST */
} LM_UINT64, *PLM_UINT64;

typedef LM_UINT64 LM_PHYSICAL_ADDRESS, *PLM_PHYSICAL_ADDRESS;

/* void LM_INC_PHYSICAL_ADDRESS(PLM_PHYSICAL_ADDRESS pAddr,LM_UINT32 IncSize) */
#define LM_INC_PHYSICAL_ADDRESS(pAddr, IncSize)             \
    {                                                       \
	LM_UINT32 OrgLow;                                   \
							    \
	OrgLow = (pAddr)->Low;                              \
	(pAddr)->Low += IncSize;                            \
	if((pAddr)->Low < OrgLow) {                         \
	    (pAddr)->High++; /* Wrap around. */             \
	}                                                   \
    }

#ifndef NULL
#define NULL                ((void *) 0)
#endif				/* NULL */

#ifndef OFFSETOF
#define OFFSETOF(_s, _m)    (MM_UINT_PTR(&(((_s *) 0)->_m)))
#endif				/* OFFSETOF */

/******************************************************************************/
/* Simple macros. */
/******************************************************************************/

#define IS_ETH_BROADCAST(_pEthAddr)                                         \
    (((unsigned char *) (_pEthAddr))[0] == ((unsigned char) 0xff))

#define IS_ETH_MULTICAST(_pEthAddr)                                         \
    (((unsigned char *) (_pEthAddr))[0] & ((unsigned char) 0x01))

#define IS_ETH_ADDRESS_EQUAL(_pEtherAddr1, _pEtherAddr2)                    \
    ((((unsigned char *) (_pEtherAddr1))[0] ==                              \
    ((unsigned char *) (_pEtherAddr2))[0]) &&                               \
    (((unsigned char *) (_pEtherAddr1))[1] ==                               \
    ((unsigned char *) (_pEtherAddr2))[1]) &&                               \
    (((unsigned char *) (_pEtherAddr1))[2] ==                               \
    ((unsigned char *) (_pEtherAddr2))[2]) &&                               \
    (((unsigned char *) (_pEtherAddr1))[3] ==                               \
    ((unsigned char *) (_pEtherAddr2))[3]) &&                               \
    (((unsigned char *) (_pEtherAddr1))[4] ==                               \
    ((unsigned char *) (_pEtherAddr2))[4]) &&                               \
    (((unsigned char *) (_pEtherAddr1))[5] ==                               \
    ((unsigned char *) (_pEtherAddr2))[5]))

#define COPY_ETH_ADDRESS(_Src, _Dst)                                        \
    ((unsigned char *) (_Dst))[0] = ((unsigned char *) (_Src))[0];          \
    ((unsigned char *) (_Dst))[1] = ((unsigned char *) (_Src))[1];          \
    ((unsigned char *) (_Dst))[2] = ((unsigned char *) (_Src))[2];          \
    ((unsigned char *) (_Dst))[3] = ((unsigned char *) (_Src))[3];          \
    ((unsigned char *) (_Dst))[4] = ((unsigned char *) (_Src))[4];          \
    ((unsigned char *) (_Dst))[5] = ((unsigned char *) (_Src))[5];

/******************************************************************************/
/* Constants. */
/******************************************************************************/

#define ETHERNET_ADDRESS_SIZE           6
#define ETHERNET_PACKET_HEADER_SIZE     14
#define MIN_ETHERNET_PACKET_SIZE        64	/* with 4 byte crc. */
#define MAX_ETHERNET_PACKET_SIZE        1518	/* with 4 byte crc. */
#define MIN_ETHERNET_PACKET_SIZE_NO_CRC 60
#define MAX_ETHERNET_PACKET_SIZE_NO_CRC 1514
#define MAX_ETHERNET_PACKET_BUFFER_SIZE 1536	/* A nice even number. */

#ifndef LM_MAX_MC_TABLE_SIZE
#define LM_MAX_MC_TABLE_SIZE            32
#endif				/* LM_MAX_MC_TABLE_SIZE */
#define LM_MC_ENTRY_SIZE                (ETHERNET_ADDRESS_SIZE+1)
#define LM_MC_INSTANCE_COUNT_INDEX      (LM_MC_ENTRY_SIZE-1)

/* Receive filter masks. */
#define LM_ACCEPT_UNICAST               0x0001
#define LM_ACCEPT_MULTICAST             0x0002
#define LM_ACCEPT_ALL_MULTICAST         0x0004
#define LM_ACCEPT_BROADCAST             0x0008
#define LM_ACCEPT_ERROR_PACKET          0x0010

#define LM_PROMISCUOUS_MODE             0x10000

/******************************************************************************/
/* PCI registers. */
/******************************************************************************/

#define PCI_VENDOR_ID_REG               0x00
#define PCI_DEVICE_ID_REG               0x02

#define PCI_COMMAND_REG                 0x04
#define PCI_IO_SPACE_ENABLE             0x0001
#define PCI_MEM_SPACE_ENABLE            0x0002
#define PCI_BUSMASTER_ENABLE            0x0004
#define PCI_MEMORY_WRITE_INVALIDATE     0x0010
#define PCI_PARITY_ERROR_ENABLE         0x0040
#define PCI_SYSTEM_ERROR_ENABLE         0x0100
#define PCI_FAST_BACK_TO_BACK_ENABLE    0x0200

#define PCI_STATUS_REG                  0x06
#define PCI_REV_ID_REG                  0x08

#define PCI_CACHE_LINE_SIZE_REG         0x0c

#define PCI_IO_BASE_ADDR_REG            0x10
#define PCI_IO_BASE_ADDR_MASK           0xfffffff0

#define PCI_MEM_BASE_ADDR_LOW           0x10
#define PCI_MEM_BASE_ADDR_HIGH          0x14

#define PCI_SUBSYSTEM_VENDOR_ID_REG     0x2c
#define PCI_SUBSYSTEM_ID_REG            0x2e
#define PCI_INT_LINE_REG                0x3c

#define PCIX_CAP_REG                    0x40
#define PCIX_ENABLE_RELAXED_ORDERING    BIT_17

/******************************************************************************/
/* Fragment structure. */
/******************************************************************************/

typedef struct {
	LM_UINT32 FragSize;
	LM_PHYSICAL_ADDRESS FragBuf;
} LM_FRAG, *PLM_FRAG;

typedef struct {
	/* FragCount is initialized for the caller to the maximum array size, on */
	/* return FragCount is the number of the actual fragments in the array. */
	LM_UINT32 FragCount;

	/* Total buffer size. */
	LM_UINT32 TotalSize;

	/* Fragment array buffer. */
	LM_FRAG Fragments[1];
} LM_FRAG_LIST, *PLM_FRAG_LIST;

#define DECLARE_FRAG_LIST_BUFFER_TYPE(_FRAG_LIST_TYPE_NAME, _MAX_FRAG_COUNT) \
    typedef struct {                                                         \
	LM_FRAG_LIST FragList;                                               \
	LM_FRAG FragListBuffer[_MAX_FRAG_COUNT-1];                           \
    } _FRAG_LIST_TYPE_NAME, *P##_FRAG_LIST_TYPE_NAME

/******************************************************************************/
/* Status codes. */
/******************************************************************************/

#define LM_STATUS_SUCCESS                                       0
#define LM_STATUS_FAILURE                                       1

#define LM_STATUS_INTERRUPT_ACTIVE                              2
#define LM_STATUS_INTERRUPT_NOT_ACTIVE                          3

#define LM_STATUS_LINK_ACTIVE                                   4
#define LM_STATUS_LINK_DOWN                                     5
#define LM_STATUS_LINK_SETTING_MISMATCH                         6

#define LM_STATUS_TOO_MANY_FRAGMENTS                            7
#define LM_STATUS_TRANSMIT_ABORTED                              8
#define LM_STATUS_TRANSMIT_ERROR                                9
#define LM_STATUS_RECEIVE_ABORTED                               10
#define LM_STATUS_RECEIVE_ERROR                                 11
#define LM_STATUS_INVALID_PACKET_SIZE                           12
#define LM_STATUS_OUT_OF_MAP_REGISTERS                          13
#define LM_STATUS_UNKNOWN_ADAPTER                               14

typedef LM_UINT LM_STATUS, *PLM_STATUS;

/******************************************************************************/
/* Requested media type. */
/******************************************************************************/

#define LM_REQUESTED_MEDIA_TYPE_AUTO                            0
#define LM_REQUESTED_MEDIA_TYPE_BNC                             1
#define LM_REQUESTED_MEDIA_TYPE_UTP_AUTO                        2
#define LM_REQUESTED_MEDIA_TYPE_UTP_10MBPS                      3
#define LM_REQUESTED_MEDIA_TYPE_UTP_10MBPS_FULL_DUPLEX          4
#define LM_REQUESTED_MEDIA_TYPE_UTP_100MBPS                     5
#define LM_REQUESTED_MEDIA_TYPE_UTP_100MBPS_FULL_DUPLEX         6
#define LM_REQUESTED_MEDIA_TYPE_UTP_1000MBPS                    7
#define LM_REQUESTED_MEDIA_TYPE_UTP_1000MBPS_FULL_DUPLEX        8
#define LM_REQUESTED_MEDIA_TYPE_FIBER_100MBPS                   9
#define LM_REQUESTED_MEDIA_TYPE_FIBER_100MBPS_FULL_DUPLEX       10
#define LM_REQUESTED_MEDIA_TYPE_FIBER_1000MBPS                  11
#define LM_REQUESTED_MEDIA_TYPE_FIBER_1000MBPS_FULL_DUPLEX      12
#define LM_REQUESTED_MEDIA_TYPE_MAC_LOOPBACK                    0xfffe
#define LM_REQUESTED_MEDIA_TYPE_PHY_LOOPBACK                    0xffff

typedef LM_UINT32 LM_REQUESTED_MEDIA_TYPE, *PLM_REQUESTED_MEDIA_TYPE;

/******************************************************************************/
/* Media type. */
/******************************************************************************/

#define LM_MEDIA_TYPE_UNKNOWN                                   -1
#define LM_MEDIA_TYPE_AUTO                                      0
#define LM_MEDIA_TYPE_UTP                                       1
#define LM_MEDIA_TYPE_BNC                                       2
#define LM_MEDIA_TYPE_AUI                                       3
#define LM_MEDIA_TYPE_FIBER                                     4

typedef LM_UINT32 LM_MEDIA_TYPE, *PLM_MEDIA_TYPE;

/******************************************************************************/
/* Line speed. */
/******************************************************************************/

#define LM_LINE_SPEED_UNKNOWN                                   0
#define LM_LINE_SPEED_10MBPS                                    1
#define LM_LINE_SPEED_100MBPS                                   2
#define LM_LINE_SPEED_1000MBPS                                  3

typedef LM_UINT32 LM_LINE_SPEED, *PLM_LINE_SPEED;

/******************************************************************************/
/* Duplex mode. */
/******************************************************************************/

#define LM_DUPLEX_MODE_UNKNOWN                                  0
#define LM_DUPLEX_MODE_HALF                                     1
#define LM_DUPLEX_MODE_FULL                                     2

typedef LM_UINT32 LM_DUPLEX_MODE, *PLM_DUPLEX_MODE;

/******************************************************************************/
/* Power state. */
/******************************************************************************/

#define LM_POWER_STATE_D0       0
#define LM_POWER_STATE_D1       1
#define LM_POWER_STATE_D2       2
#define LM_POWER_STATE_D3       3

typedef LM_UINT32 LM_POWER_STATE, *PLM_POWER_STATE;

/******************************************************************************/
/* Task offloading. */
/******************************************************************************/

#define LM_TASK_OFFLOAD_NONE                    0x0000
#define LM_TASK_OFFLOAD_TX_IP_CHECKSUM          0x0001
#define LM_TASK_OFFLOAD_RX_IP_CHECKSUM          0x0002
#define LM_TASK_OFFLOAD_TX_TCP_CHECKSUM         0x0004
#define LM_TASK_OFFLOAD_RX_TCP_CHECKSUM         0x0008
#define LM_TASK_OFFLOAD_TX_UDP_CHECKSUM         0x0010
#define LM_TASK_OFFLOAD_RX_UDP_CHECKSUM         0x0020
#define LM_TASK_OFFLOAD_TCP_SEGMENTATION        0x0040

typedef LM_UINT32 LM_TASK_OFFLOAD, *PLM_TASK_OFFLOAD;

/******************************************************************************/
/* Flow control. */
/******************************************************************************/

#define LM_FLOW_CONTROL_NONE                    0x00
#define LM_FLOW_CONTROL_RECEIVE_PAUSE           0x01
#define LM_FLOW_CONTROL_TRANSMIT_PAUSE          0x02
#define LM_FLOW_CONTROL_RX_TX_PAUSE (LM_FLOW_CONTROL_RECEIVE_PAUSE | \
    LM_FLOW_CONTROL_TRANSMIT_PAUSE)

/* This value can be or-ed with RECEIVE_PAUSE and TRANSMIT_PAUSE.  If the */
/* auto-negotiation is disabled and the RECEIVE_PAUSE and TRANSMIT_PAUSE */
/* bits are set, then flow control is enabled regardless of link partner's */
/* flow control capability. */
#define LM_FLOW_CONTROL_AUTO_PAUSE              0x80000000

typedef LM_UINT32 LM_FLOW_CONTROL, *PLM_FLOW_CONTROL;

/******************************************************************************/
/* Wake up mode. */
/******************************************************************************/

#define LM_WAKE_UP_MODE_NONE                    0
#define LM_WAKE_UP_MODE_MAGIC_PACKET            1
#define LM_WAKE_UP_MODE_NWUF                    2
#define LM_WAKE_UP_MODE_LINK_CHANGE             4

typedef LM_UINT32 LM_WAKE_UP_MODE, *PLM_WAKE_UP_MODE;

/******************************************************************************/
/* Counters. */
/******************************************************************************/

#define LM_COUNTER_FRAMES_XMITTED_OK                            0
#define LM_COUNTER_FRAMES_RECEIVED_OK                           1
#define LM_COUNTER_ERRORED_TRANSMIT_COUNT                       2
#define LM_COUNTER_ERRORED_RECEIVE_COUNT                        3
#define LM_COUNTER_RCV_CRC_ERROR                                4
#define LM_COUNTER_ALIGNMENT_ERROR                              5
#define LM_COUNTER_SINGLE_COLLISION_FRAMES                      6
#define LM_COUNTER_MULTIPLE_COLLISION_FRAMES                    7
#define LM_COUNTER_FRAMES_DEFERRED                              8
#define LM_COUNTER_MAX_COLLISIONS                               9
#define LM_COUNTER_RCV_OVERRUN                                  10
#define LM_COUNTER_XMIT_UNDERRUN                                11
#define LM_COUNTER_UNICAST_FRAMES_XMIT                          12
#define LM_COUNTER_MULTICAST_FRAMES_XMIT                        13
#define LM_COUNTER_BROADCAST_FRAMES_XMIT                        14
#define LM_COUNTER_UNICAST_FRAMES_RCV                           15
#define LM_COUNTER_MULTICAST_FRAMES_RCV                         16
#define LM_COUNTER_BROADCAST_FRAMES_RCV                         17

typedef LM_UINT32 LM_COUNTER_TYPE, *PLM_COUNTER_TYPE;

/******************************************************************************/
/* Forward definition. */
/******************************************************************************/

typedef struct _LM_DEVICE_BLOCK *PLM_DEVICE_BLOCK;
typedef struct _LM_PACKET *PLM_PACKET;

/******************************************************************************/
/* Function prototypes. */
/******************************************************************************/

LM_STATUS LM_GetAdapterInfo (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_InitializeAdapter (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_ResetAdapter (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_DisableInterrupt (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_EnableInterrupt (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_SendPacket (PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket);
LM_STATUS LM_ServiceInterrupts (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_QueueRxPackets (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_SetReceiveMask (PLM_DEVICE_BLOCK pDevice, LM_UINT32 Mask);
LM_STATUS LM_Halt (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_Abort (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_MulticastAdd (PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pMcAddress);
LM_STATUS LM_MulticastDel (PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pMcAddress);
LM_STATUS LM_MulticastClear (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_SetMacAddress (PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pMacAddress);
LM_STATUS LM_LoopbackAddress (PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pAddress);

LM_UINT32 LM_GetCrcCounter (PLM_DEVICE_BLOCK pDevice);

LM_WAKE_UP_MODE LM_PMCapabilities (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_NwufAdd (PLM_DEVICE_BLOCK pDevice, LM_UINT32 ByteMaskSize,
		      LM_UINT8 * pByteMask, LM_UINT8 * pPattern);
LM_STATUS LM_NwufRemove (PLM_DEVICE_BLOCK pDevice, LM_UINT32 ByteMaskSize,
			 LM_UINT8 * pByteMask, LM_UINT8 * pPattern);
LM_STATUS LM_SetPowerState (PLM_DEVICE_BLOCK pDevice,
			    LM_POWER_STATE PowerLevel);

LM_VOID LM_ReadPhy (PLM_DEVICE_BLOCK pDevice, LM_UINT32 PhyReg,
		    PLM_UINT32 pData32);
LM_VOID LM_WritePhy (PLM_DEVICE_BLOCK pDevice, LM_UINT32 PhyReg,
		     LM_UINT32 Data32);

LM_STATUS LM_ControlLoopBack (PLM_DEVICE_BLOCK pDevice, LM_UINT32 Control);
LM_STATUS LM_SetupPhy (PLM_DEVICE_BLOCK pDevice);
int LM_BlinkLED (PLM_DEVICE_BLOCK pDevice, LM_UINT32 BlinkDuration);

/******************************************************************************/
/* These are the OS specific functions called by LMAC. */
/******************************************************************************/

LM_STATUS MM_ReadConfig16 (PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset,
			   LM_UINT16 * pValue16);
LM_STATUS MM_WriteConfig16 (PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset,
			    LM_UINT16 Value16);
LM_STATUS MM_ReadConfig32 (PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset,
			   LM_UINT32 * pValue32);
LM_STATUS MM_WriteConfig32 (PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset,
			    LM_UINT32 Value32);
LM_STATUS MM_MapMemBase (PLM_DEVICE_BLOCK pDevice);
LM_STATUS MM_MapIoBase (PLM_DEVICE_BLOCK pDevice);
LM_STATUS MM_IndicateRxPackets (PLM_DEVICE_BLOCK pDevice);
LM_STATUS MM_IndicateTxPackets (PLM_DEVICE_BLOCK pDevice);
LM_STATUS MM_StartTxDma (PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket);
LM_STATUS MM_CompleteTxDma (PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket);
LM_STATUS MM_AllocateMemory (PLM_DEVICE_BLOCK pDevice, LM_UINT32 BlockSize,
			     PLM_VOID * pMemoryBlockVirt);
LM_STATUS MM_AllocateSharedMemory (PLM_DEVICE_BLOCK pDevice,
				   LM_UINT32 BlockSize,
				   PLM_VOID * pMemoryBlockVirt,
				   PLM_PHYSICAL_ADDRESS pMemoryBlockPhy,
				   LM_BOOL Cached);
LM_STATUS MM_GetConfig (PLM_DEVICE_BLOCK pDevice);
LM_STATUS MM_IndicateStatus (PLM_DEVICE_BLOCK pDevice, LM_STATUS Status);
LM_STATUS MM_InitializeUmPackets (PLM_DEVICE_BLOCK pDevice);
LM_STATUS MM_FreeRxBuffer (PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket);
LM_STATUS MM_CoalesceTxBuffer (PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket);
LM_STATUS LM_MbufWorkAround (PLM_DEVICE_BLOCK pDevice);
LM_STATUS LM_SetLinkSpeed (PLM_DEVICE_BLOCK pDevice,
			   LM_REQUESTED_MEDIA_TYPE RequestedMediaType);

#if INCLUDE_5703_A0_FIX
LM_STATUS LM_Load5703DmaWFirmware (PLM_DEVICE_BLOCK pDevice);
#endif

#endif				/* LM_H */