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