~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/staging/et131x/et131x_adapter.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
#define LO_MARK_PERCENT_FOR_RX      15
84
84
 
85
85
/* RFD (Receive Frame Descriptor) */
86
 
typedef struct _MP_RFD {
 
86
struct rfd {
87
87
        struct list_head list_node;
88
 
        struct sk_buff *Packet;
89
 
        u32 PacketSize; /* total size of receive frame */
 
88
        struct sk_buff *skb;
 
89
        u32 len;        /* total size of receive frame */
90
90
        u16 bufferindex;
91
91
        u8 ringindex;
92
 
} MP_RFD, *PMP_RFD;
 
92
};
93
93
 
94
 
/* Enum for Flow Control */
95
 
typedef enum _eflow_control_t {
96
 
        Both = 0,
97
 
        TxOnly = 1,
98
 
        RxOnly = 2,
99
 
        None = 3
100
 
} eFLOW_CONTROL_t, *PeFLOW_CONTROL_t;
 
94
/* Flow Control */
 
95
#define FLOW_BOTH       0
 
96
#define FLOW_TXONLY     1
 
97
#define FLOW_RXONLY     2
 
98
#define FLOW_NONE       3
101
99
 
102
100
/* Struct to define some device statistics */
103
101
typedef struct _ce_stats_t {
147
145
        u32 InterruptStatus;
148
146
} CE_STATS_t, *PCE_STATS_t;
149
147
 
150
 
typedef struct _MP_POWER_MGMT {
151
 
        /* variable putting the phy into coma mode when boot up with no cable
152
 
         * plugged in after 5 seconds
153
 
         */
154
 
        u8 TransPhyComaModeOnBoot;
155
 
 
156
 
        /* Next two used to save power information at power down. This
157
 
         * information will be used during power up to set up parts of Power
158
 
         * Management in JAGCore
159
 
         */
160
 
        u16 PowerDownSpeed;
161
 
        u8 PowerDownDuplex;
162
 
} MP_POWER_MGMT, *PMP_POWER_MGMT;
163
148
 
164
149
/* The private adapter structure */
165
150
struct et131x_adapter {
173
158
        u32 HwErrCount;
174
159
 
175
160
        /* Configuration  */
176
 
        u8 PermanentAddress[ETH_ALEN];
177
 
        u8 CurrentAddress[ETH_ALEN];
 
161
        u8 rom_addr[ETH_ALEN];
 
162
        u8 addr[ETH_ALEN];
178
163
        bool has_eeprom;
179
 
        u8 eepromData[2];
 
164
        u8 eeprom_data[2];
180
165
 
181
166
        /* Spinlocks */
182
167
        spinlock_t Lock;
183
168
 
184
169
        spinlock_t TCBSendQLock;
185
170
        spinlock_t TCBReadyQLock;
186
 
        spinlock_t SendHWLock;
 
171
        spinlock_t send_hw_lock;
187
172
 
188
 
        spinlock_t RcvLock;
 
173
        spinlock_t rcv_lock;
189
174
        spinlock_t RcvPendLock;
190
175
        spinlock_t FbrLock;
191
176
 
205
190
 
206
191
        /* Registry parameters */
207
192
        u8 SpeedDuplex;         /* speed/duplex */
208
 
        eFLOW_CONTROL_t RegistryFlowControl;    /* for 802.3x flow control */
 
193
        u8 wanted_flow;         /* Flow we want for 802.3x flow control */
209
194
        u8 RegistryPhyComa;     /* Phy Coma mode enable/disable */
210
195
 
211
196
        u32 RegistryRxMemEnd;   /* Size of internal rx memory */
214
199
 
215
200
        /* Derived from the registry: */
216
201
        u8 AiForceDpx;          /* duplex setting */
217
 
        u16 AiForceSpeed;               /* 'Speed', user over-ride of line speed */
218
 
        eFLOW_CONTROL_t FlowControl;    /* flow control validated by the far-end */
 
202
        u16 AiForceSpeed;       /* 'Speed', user over-ride of line speed */
 
203
        u8 flowcontrol;         /* flow control validated by the far-end */
219
204
        enum {
220
205
                NETIF_STATUS_INVALID = 0,
221
206
                NETIF_STATUS_MEDIA_CONNECT,
225
210
 
226
211
        /* Minimize init-time */
227
212
        struct timer_list ErrorTimer;
228
 
        MP_POWER_MGMT PoMgmt;
 
213
 
 
214
        /* variable putting the phy into coma mode when boot up with no cable
 
215
         * plugged in after 5 seconds
 
216
         */
 
217
        u8 boot_coma;
 
218
 
 
219
        /* Next two used to save power information at power down. This
 
220
         * information will be used during power up to set up parts of Power
 
221
         * Management in JAGCore
 
222
         */
 
223
        u16 pdown_speed;
 
224
        u8 pdown_duplex;
 
225
 
229
226
        u32 CachedMaskValue;
230
227
 
231
228
        /* Xcvr status at last poll */