Commit 73b07065 authored by J.R. Mauro's avatar J.R. Mauro Committed by Greg Kroah-Hartman

Staging: sxg: remove typedefs

Remove typedefs in the sxg driver

Signed-off by: J.R. Mauro <jrm8005@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1b8ee916
This diff is collapsed.
This diff is collapsed.
......@@ -44,10 +44,10 @@
#define FALSE (0)
#define TRUE (1)
typedef struct _LIST_ENTRY {
struct _LIST_ENTRY *nle_flink;
struct _LIST_ENTRY *nle_blink;
} list_entry, LIST_ENTRY, *PLIST_ENTRY;
struct LIST_ENTRY {
struct LIST_ENTRY *nle_flink;
struct LIST_ENTRY *nle_blink;
};
#define InitializeListHead(l) \
(l)->nle_flink = (l)->nle_blink = (l)
......@@ -68,10 +68,10 @@ typedef struct _LIST_ENTRY {
/* These two have to be inlined since they return things. */
static __inline PLIST_ENTRY RemoveHeadList(list_entry * l)
static __inline struct LIST_ENTRY *RemoveHeadList(struct LIST_ENTRY *l)
{
list_entry *f;
list_entry *e;
struct LIST_ENTRY *f;
struct LIST_ENTRY *e;
e = l->nle_flink;
f = e->nle_flink;
......@@ -81,10 +81,10 @@ static __inline PLIST_ENTRY RemoveHeadList(list_entry * l)
return (e);
}
static __inline PLIST_ENTRY RemoveTailList(list_entry * l)
static __inline struct LIST_ENTRY *RemoveTailList(struct LIST_ENTRY *l)
{
list_entry *b;
list_entry *e;
struct LIST_ENTRY *b;
struct LIST_ENTRY *e;
e = l->nle_blink;
b = e->nle_blink;
......@@ -96,7 +96,7 @@ static __inline PLIST_ENTRY RemoveTailList(list_entry * l)
#define InsertTailList(l, e) \
do { \
list_entry *b; \
struct LIST_ENTRY *b; \
\
b = (l)->nle_blink; \
(e)->nle_flink = (l); \
......@@ -107,7 +107,7 @@ static __inline PLIST_ENTRY RemoveTailList(list_entry * l)
#define InsertHeadList(l, e) \
do { \
list_entry *f; \
struct LIST_ENTRY *f; \
\
f = (l)->nle_flink; \
(e)->nle_flink = f; \
......
......@@ -86,7 +86,7 @@ extern ulong ATKTimerDiv;
* needs of the trace entry. Typically they are function call
* parameters.
*/
typedef struct _trace_entry_s {
struct trace_entry_t {
char name[8]; /* 8 character name - like 's'i'm'b'a'r'c'v' */
u32 time; /* Current clock tic */
unsigned char cpu; /* Current CPU */
......@@ -97,7 +97,7 @@ typedef struct _trace_entry_s {
u32 arg2; /* Caller arg2 */
u32 arg3; /* Caller arg3 */
u32 arg4; /* Caller arg4 */
} trace_entry_t, *ptrace_entry_t;
};
/*
* Driver types for driver field in trace_entry_t
......@@ -108,14 +108,13 @@ typedef struct _trace_entry_s {
#define TRACE_ENTRIES 1024
typedef struct _sxg_trace_buffer_t
{
struct sxg_trace_buffer_t {
unsigned int size; /* aid for windbg extension */
unsigned int in; /* Where to add */
unsigned int level; /* Current Trace level */
spinlock_t lock; /* For MP tracing */
trace_entry_t entries[TRACE_ENTRIES];/* The circular buffer */
} sxg_trace_buffer_t;
struct trace_entry_t entries[TRACE_ENTRIES];/* The circular buffer */
};
/*
* The trace levels
......@@ -137,7 +136,7 @@ typedef struct _sxg_trace_buffer_t
#if ATK_TRACE_ENABLED
#define SXG_TRACE_INIT(buffer, tlevel) \
{ \
memset((buffer), 0, sizeof(sxg_trace_buffer_t)); \
memset((buffer), 0, sizeof(struct sxg_trace_buffer_t)); \
(buffer)->level = (tlevel); \
(buffer)->size = TRACE_ENTRIES; \
spin_lock_init(&(buffer)->lock); \
......@@ -154,7 +153,7 @@ typedef struct _sxg_trace_buffer_t
if ((buffer) && ((buffer)->level >= (tlevel))) { \
unsigned int trace_irql = 0; /* ?????? FIX THIS */ \
unsigned int trace_len; \
ptrace_entry_t trace_entry; \
struct trace_entry_t *trace_entry; \
struct timeval timev; \
\
spin_lock(&(buffer)->lock); \
......
This diff is collapsed.
......@@ -48,7 +48,7 @@
#define SXG_HWREG_MEMSIZE 0x4000 // 16k
#pragma pack(push, 1)
typedef struct _SXG_HW_REGS {
struct SXG_HW_REGS {
u32 Reset; // Write 0xdead to invoke soft reset
u32 Pad1; // No register defined at offset 4
u32 InterruptMask0; // Deassert legacy interrupt on function 0
......@@ -113,7 +113,7 @@ typedef struct _SXG_HW_REGS {
u32 Software[1920]; // 0x200 - 0x2000 - Software defined (not used)
u32 MsixTable[1024]; // 0x2000 - 0x3000 - MSIX Table
u32 MsixBitArray[1024]; // 0x3000 - 0x4000 - MSIX Pending Bit Array
} SXG_HW_REGS, *PSXG_HW_REGS;
};
#pragma pack(pop)
// Microcode Address Flags
......@@ -519,10 +519,10 @@ typedef struct _SXG_HW_REGS {
#define XS_LANE_ALIGN 0x1000 // XS transmit lanes aligned
// PHY Microcode download data structure
typedef struct _PHY_UCODE {
struct PHY_UCODE {
ushort Addr;
ushort Data;
} PHY_UCODE, *PPHY_UCODE;
};
/*****************************************************************************
......@@ -537,7 +537,7 @@ typedef struct _PHY_UCODE {
// all commands - see the Sahara spec for details. Note that this structure is
// only valid when compiled on a little endian machine.
#pragma pack(push, 1)
typedef struct _XMT_DESC {
struct XMT_DESC {
ushort XmtLen; // word 0, bits [15:0] - transmit length
unsigned char XmtCtl; // word 0, bits [23:16] - transmit control byte
unsigned char Cmd; // word 0, bits [31:24] - transmit command plus misc.
......@@ -551,7 +551,7 @@ typedef struct _XMT_DESC {
u32 Rsvd3; // word 5, bits [31:0] - PAD
u32 Rsvd4; // word 6, bits [31:0] - PAD
u32 Rsvd5; // word 7, bits [31:0] - PAD
} XMT_DESC, *PXMT_DESC;
};
#pragma pack(pop)
// XMT_DESC Cmd byte definitions
......@@ -600,7 +600,7 @@ typedef struct _XMT_DESC {
// Format of the 18 byte Receive Buffer returned by the
// Receive Sequencer for received packets
#pragma pack(push, 1)
typedef struct _RCV_BUF_HDR {
struct RCV_BUF_HDR {
u32 Status; // Status word from Rcv Seq Parser
ushort Length; // Rcv packet byte count
union {
......@@ -615,7 +615,7 @@ typedef struct _RCV_BUF_HDR {
unsigned char IpHdrOffset; // IP header offset into packet
u32 TpzHash; // Toeplitz hash
ushort Reserved; // Reserved
} RCV_BUF_HDR, *PRCV_BUF_HDR;
};
#pragma pack(pop)
......@@ -665,28 +665,28 @@ typedef struct _RCV_BUF_HDR {
#pragma pack(push, 1)
/* */
typedef struct _HW_CFG_DATA {
struct HW_CFG_DATA {
ushort Addr;
union {
ushort Data;
ushort Checksum;
};
} HW_CFG_DATA, *PHW_CFG_DATA;
};
/* */
#define NUM_HW_CFG_ENTRIES ((128/sizeof(HW_CFG_DATA)) - 4)
#define NUM_HW_CFG_ENTRIES ((128/sizeof(struct HW_CFG_DATA)) - 4)
/* MAC address */
typedef struct _SXG_CONFIG_MAC {
struct SXG_CONFIG_MAC {
unsigned char MacAddr[6]; /* MAC Address */
} SXG_CONFIG_MAC, *PSXG_CONFIG_MAC;
};
/* */
typedef struct _ATK_FRU {
struct ATK_FRU {
unsigned char PartNum[6];
unsigned char Revision[2];
unsigned char Serial[14];
} ATK_FRU, *PATK_FRU;
};
/* OEM FRU Format types */
#define ATK_FRU_FORMAT 0x0000
......@@ -698,24 +698,24 @@ typedef struct _ATK_FRU {
#define NO_FRU_FORMAT 0xFFFF
/* EEPROM/Flash Format */
typedef struct _SXG_CONFIG {
struct SXG_CONFIG {
/* */
/* Section 1 (128 bytes) */
/* */
ushort MagicWord; /* EEPROM/FLASH Magic code 'A5A5' */
ushort SpiClks; /* SPI bus clock dividers */
HW_CFG_DATA HwCfg[NUM_HW_CFG_ENTRIES];
struct HW_CFG_DATA HwCfg[NUM_HW_CFG_ENTRIES];
/* */
/* */
/* */
ushort Version; /* EEPROM format version */
SXG_CONFIG_MAC MacAddr[4]; /* space for 4 MAC addresses */
ATK_FRU AtkFru; /* FRU information */
struct SXG_CONFIG_MAC MacAddr[4]; /* space for 4 MAC addresses */
struct ATK_FRU AtkFru; /* FRU information */
ushort OemFruFormat; /* OEM FRU format type */
unsigned char OemFru[76]; /* OEM FRU information (optional) */
ushort Checksum; /* Checksum of section 2 */
/* CS info XXXTODO */
} SXG_CONFIG, *PSXG_CONFIG;
};
#pragma pack(pop)
/*****************************************************************************
......
......@@ -18,7 +18,7 @@
/*
* Download for AEL2005C PHY with SR/LR transceiver (10GBASE-SR or 10GBASE-LR)
*/
static PHY_UCODE PhyUcode[] = {
static struct PHY_UCODE PhyUcode[] = {
/*
* NOTE: An address of 0 is a special case. When the download routine
* sees an address of 0, it does not write to the PHY. Instead, it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment