mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-24 12:44:23 +08:00
cosmetic changes to bcm570x driver
This is a cosmetic only changes submission. It affects files relevant to bcm570x driver. the commands used to generate this change was cd drivers Lindent -pcs -l80 bcm570x.c bcm570x_lm.h bcm570x_mm.h tigon3.c tigon3.h The BMW target (the only one using this chip so far) builds cleanly, the `before and after' generated object files for drivers/bcm570x.c and drivers/tigon3.o are identical as reported by objdump -d Signed-off-by: Vadim Bendebury <vbendeb@google.com> Signed-off-by: Ben Warren <bwarren@qstreams.com>
This commit is contained in:
parent
c0c292b285
commit
f539edc076
2358
drivers/bcm570x.c
2358
drivers/bcm570x.c
File diff suppressed because it is too large
Load Diff
@ -19,29 +19,28 @@
|
||||
#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;
|
||||
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_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;
|
||||
@ -58,15 +57,13 @@ typedef LM_UINT64 LM_PHYSICAL_ADDRESS, *PLM_PHYSICAL_ADDRESS;
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *) 0)
|
||||
#endif /* NULL */
|
||||
#endif /* NULL */
|
||||
|
||||
#ifndef OFFSETOF
|
||||
#define OFFSETOF(_s, _m) (MM_UINT_PTR(&(((_s *) 0)->_m)))
|
||||
#endif /* OFFSETOF */
|
||||
|
||||
#endif /* OFFSETOF */
|
||||
|
||||
/******************************************************************************/
|
||||
/* Simple macros. */
|
||||
@ -100,26 +97,24 @@ typedef LM_UINT64 LM_PHYSICAL_ADDRESS, *PLM_PHYSICAL_ADDRESS;
|
||||
((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 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. */
|
||||
#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 */
|
||||
#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
|
||||
@ -129,7 +124,6 @@ typedef LM_UINT64 LM_PHYSICAL_ADDRESS, *PLM_PHYSICAL_ADDRESS;
|
||||
|
||||
#define LM_PROMISCUOUS_MODE 0x10000
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* PCI registers. */
|
||||
/******************************************************************************/
|
||||
@ -169,20 +163,20 @@ typedef LM_UINT64 LM_PHYSICAL_ADDRESS, *PLM_PHYSICAL_ADDRESS;
|
||||
/******************************************************************************/
|
||||
|
||||
typedef struct {
|
||||
LM_UINT32 FragSize;
|
||||
LM_PHYSICAL_ADDRESS FragBuf;
|
||||
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;
|
||||
/* 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;
|
||||
/* Total buffer size. */
|
||||
LM_UINT32 TotalSize;
|
||||
|
||||
/* Fragment array buffer. */
|
||||
LM_FRAG Fragments[1];
|
||||
/* 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) \
|
||||
@ -191,7 +185,6 @@ typedef struct {
|
||||
LM_FRAG FragListBuffer[_MAX_FRAG_COUNT-1]; \
|
||||
} _FRAG_LIST_TYPE_NAME, *P##_FRAG_LIST_TYPE_NAME
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Status codes. */
|
||||
/******************************************************************************/
|
||||
@ -217,7 +210,6 @@ typedef struct {
|
||||
|
||||
typedef LM_UINT LM_STATUS, *PLM_STATUS;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Requested media type. */
|
||||
/******************************************************************************/
|
||||
@ -240,7 +232,6 @@ typedef LM_UINT LM_STATUS, *PLM_STATUS;
|
||||
|
||||
typedef LM_UINT32 LM_REQUESTED_MEDIA_TYPE, *PLM_REQUESTED_MEDIA_TYPE;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Media type. */
|
||||
/******************************************************************************/
|
||||
@ -254,7 +245,6 @@ typedef LM_UINT32 LM_REQUESTED_MEDIA_TYPE, *PLM_REQUESTED_MEDIA_TYPE;
|
||||
|
||||
typedef LM_UINT32 LM_MEDIA_TYPE, *PLM_MEDIA_TYPE;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Line speed. */
|
||||
/******************************************************************************/
|
||||
@ -266,7 +256,6 @@ typedef LM_UINT32 LM_MEDIA_TYPE, *PLM_MEDIA_TYPE;
|
||||
|
||||
typedef LM_UINT32 LM_LINE_SPEED, *PLM_LINE_SPEED;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Duplex mode. */
|
||||
/******************************************************************************/
|
||||
@ -277,7 +266,6 @@ typedef LM_UINT32 LM_LINE_SPEED, *PLM_LINE_SPEED;
|
||||
|
||||
typedef LM_UINT32 LM_DUPLEX_MODE, *PLM_DUPLEX_MODE;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Power state. */
|
||||
/******************************************************************************/
|
||||
@ -289,7 +277,6 @@ typedef LM_UINT32 LM_DUPLEX_MODE, *PLM_DUPLEX_MODE;
|
||||
|
||||
typedef LM_UINT32 LM_POWER_STATE, *PLM_POWER_STATE;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Task offloading. */
|
||||
/******************************************************************************/
|
||||
@ -305,7 +292,6 @@ typedef LM_UINT32 LM_POWER_STATE, *PLM_POWER_STATE;
|
||||
|
||||
typedef LM_UINT32 LM_TASK_OFFLOAD, *PLM_TASK_OFFLOAD;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Flow control. */
|
||||
/******************************************************************************/
|
||||
@ -324,7 +310,6 @@ typedef LM_UINT32 LM_TASK_OFFLOAD, *PLM_TASK_OFFLOAD;
|
||||
|
||||
typedef LM_UINT32 LM_FLOW_CONTROL, *PLM_FLOW_CONTROL;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Wake up mode. */
|
||||
/******************************************************************************/
|
||||
@ -336,7 +321,6 @@ typedef LM_UINT32 LM_FLOW_CONTROL, *PLM_FLOW_CONTROL;
|
||||
|
||||
typedef LM_UINT32 LM_WAKE_UP_MODE, *PLM_WAKE_UP_MODE;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Counters. */
|
||||
/******************************************************************************/
|
||||
@ -362,7 +346,6 @@ typedef LM_UINT32 LM_WAKE_UP_MODE, *PLM_WAKE_UP_MODE;
|
||||
|
||||
typedef LM_UINT32 LM_COUNTER_TYPE, *PLM_COUNTER_TYPE;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Forward definition. */
|
||||
/******************************************************************************/
|
||||
@ -370,82 +353,82 @@ typedef LM_UINT32 LM_COUNTER_TYPE, *PLM_COUNTER_TYPE;
|
||||
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_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_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_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);
|
||||
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);
|
||||
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);
|
||||
LM_STATUS LM_Load5703DmaWFirmware (PLM_DEVICE_BLOCK pDevice);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* LM_H */
|
||||
#endif /* LM_H */
|
||||
|
@ -45,7 +45,7 @@ extern int MM_Packet_Desc_Size;
|
||||
|
||||
#define MM_PACKET_DESC_SIZE MM_Packet_Desc_Size
|
||||
|
||||
DECLARE_QUEUE_TYPE(UM_RX_PACKET_Q, MAX_RX_PACKET_DESC_COUNT+1);
|
||||
DECLARE_QUEUE_TYPE (UM_RX_PACKET_Q, MAX_RX_PACKET_DESC_COUNT + 1);
|
||||
|
||||
#define MAX_MEM 16
|
||||
|
||||
@ -65,51 +65,50 @@ typedef struct _UM_DEVICE_BLOCK {
|
||||
int mtu;
|
||||
int index;
|
||||
int opened;
|
||||
int delayed_link_ind; /* Delay link status during initial load */
|
||||
int adapter_just_inited; /* the first few seconds after init. */
|
||||
int spurious_int; /* new -- unsupported */
|
||||
int delayed_link_ind; /* Delay link status during initial load */
|
||||
int adapter_just_inited; /* the first few seconds after init. */
|
||||
int spurious_int; /* new -- unsupported */
|
||||
int timer_interval;
|
||||
int adaptive_expiry;
|
||||
int crc_counter_expiry; /* new -- unsupported */
|
||||
int poll_tib_expiry; /* new -- unsupported */
|
||||
int crc_counter_expiry; /* new -- unsupported */
|
||||
int poll_tib_expiry; /* new -- unsupported */
|
||||
int tx_full;
|
||||
int tx_queued;
|
||||
int line_speed; /* in Mbps, 0 if link is down */
|
||||
UM_RX_PACKET_Q rx_out_of_buf_q;
|
||||
int rx_out_of_buf;
|
||||
int rx_low_buf_thresh; /* changed to rx_buf_repl_thresh */
|
||||
int rx_low_buf_thresh; /* changed to rx_buf_repl_thresh */
|
||||
int rx_buf_repl_panic_thresh;
|
||||
int rx_buf_align; /* new -- unsupported */
|
||||
int rx_buf_align; /* new -- unsupported */
|
||||
int do_global_lock;
|
||||
mutex_t global_lock;
|
||||
mutex_t undi_lock;
|
||||
long undi_flags;
|
||||
volatile int interrupt;
|
||||
int tasklet_pending;
|
||||
int tasklet_busy; /* new -- unsupported */
|
||||
int tasklet_busy; /* new -- unsupported */
|
||||
int rx_pkt;
|
||||
int tx_pkt;
|
||||
#ifdef NICE_SUPPORT /* unsupported, this is a linux ioctl */
|
||||
void (*nice_rx)(void*, void* );
|
||||
void* nice_ctx;
|
||||
#endif /* NICE_SUPPORT */
|
||||
#ifdef NICE_SUPPORT /* unsupported, this is a linux ioctl */
|
||||
void (*nice_rx) (void *, void *);
|
||||
void *nice_ctx;
|
||||
#endif /* NICE_SUPPORT */
|
||||
int rx_adaptive_coalesce;
|
||||
unsigned int rx_last_cnt;
|
||||
unsigned int tx_last_cnt;
|
||||
unsigned int rx_curr_coalesce_frames;
|
||||
unsigned int rx_curr_coalesce_ticks;
|
||||
unsigned int tx_curr_coalesce_frames; /* new -- unsupported */
|
||||
#if TIGON3_DEBUG /* new -- unsupported */
|
||||
unsigned int tx_curr_coalesce_frames; /* new -- unsupported */
|
||||
#if TIGON3_DEBUG /* new -- unsupported */
|
||||
uint tx_zc_count;
|
||||
uint tx_chksum_count;
|
||||
uint tx_himem_count;
|
||||
uint rx_good_chksum_count;
|
||||
#endif
|
||||
unsigned int rx_bad_chksum_count; /* new -- unsupported */
|
||||
unsigned int rx_misc_errors; /* new -- unsupported */
|
||||
unsigned int rx_bad_chksum_count; /* new -- unsupported */
|
||||
unsigned int rx_misc_errors; /* new -- unsupported */
|
||||
} UM_DEVICE_BLOCK, *PUM_DEVICE_BLOCK;
|
||||
|
||||
|
||||
/* Physical/PCI DMA address */
|
||||
typedef union {
|
||||
dma_addr_t dma_map;
|
||||
@ -117,9 +116,9 @@ typedef union {
|
||||
|
||||
/* Packet */
|
||||
typedef struct
|
||||
_UM_PACKET {
|
||||
LM_PACKET lm_packet;
|
||||
void* skbuff; /* Address of packet buffer */
|
||||
_UM_PACKET {
|
||||
LM_PACKET lm_packet;
|
||||
void *skbuff; /* Address of packet buffer */
|
||||
} UM_PACKET, *PUM_PACKET;
|
||||
|
||||
#define MM_ACQUIRE_UNDI_LOCK(_pDevice)
|
||||
@ -137,15 +136,14 @@ _UM_PACKET {
|
||||
|
||||
#define MEM_TO_PCI_PHYS(addr) (addr)
|
||||
|
||||
extern void MM_SetAddr (LM_PHYSICAL_ADDRESS *paddr, dma_addr_t addr);
|
||||
extern void MM_SetT3Addr(T3_64BIT_HOST_ADDR *paddr, dma_addr_t addr);
|
||||
extern void MM_SetAddr (LM_PHYSICAL_ADDRESS * paddr, dma_addr_t addr);
|
||||
extern void MM_SetT3Addr (T3_64BIT_HOST_ADDR * paddr, dma_addr_t addr);
|
||||
extern void MM_MapTxDma (PLM_DEVICE_BLOCK pDevice,
|
||||
struct _LM_PACKET *pPacket, T3_64BIT_HOST_ADDR *paddr,
|
||||
LM_UINT32 *len, int frag);
|
||||
extern void MM_MapRxDma ( PLM_DEVICE_BLOCK pDevice,
|
||||
struct _LM_PACKET *pPacket,
|
||||
T3_64BIT_HOST_ADDR *paddr);
|
||||
|
||||
struct _LM_PACKET *pPacket, T3_64BIT_HOST_ADDR * paddr,
|
||||
LM_UINT32 * len, int frag);
|
||||
extern void MM_MapRxDma (PLM_DEVICE_BLOCK pDevice,
|
||||
struct _LM_PACKET *pPacket,
|
||||
T3_64BIT_HOST_ADDR * paddr);
|
||||
|
||||
/* BSP needs to provide sysUsecDelay and sysSerialPrintString */
|
||||
extern void sysSerialPrintString (char *s);
|
||||
@ -157,4 +155,4 @@ extern void sysSerialPrintString (char *s);
|
||||
#if 0
|
||||
#define cpu_to_le32(val) LONGSWAP(val)
|
||||
#endif
|
||||
#endif /* MM_H */
|
||||
#endif /* MM_H */
|
||||
|
9816
drivers/tigon3.c
9816
drivers/tigon3.c
File diff suppressed because it is too large
Load Diff
3359
drivers/tigon3.h
3359
drivers/tigon3.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user