aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/saa9730.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/saa9730.h')
-rw-r--r--drivers/net/saa9730.h36
1 files changed, 25 insertions, 11 deletions
diff --git a/drivers/net/saa9730.h b/drivers/net/saa9730.h
index 9e9da6b4080f..a7e9d29a86a7 100644
--- a/drivers/net/saa9730.h
+++ b/drivers/net/saa9730.h
@@ -1,6 +1,7 @@
1/* 1/*
2 * Carsten Langgaard, carstenl@mips.com 2 * Copyright (C) 2000, 2005 MIPS Technologies, Inc. All rights reserved.
3 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. 3 * Authors: Carsten Langgaard <carstenl@mips.com>
4 * Maciej W. Rozycki <macro@mips.com>
4 * 5 *
5 * ######################################################################## 6 * ########################################################################
6 * 7 *
@@ -265,6 +266,7 @@
265 266
266/* The SAA9730 (LAN) controller register map, as seen via the PCI-bus. */ 267/* The SAA9730 (LAN) controller register map, as seen via the PCI-bus. */
267#define SAA9730_LAN_REGS_ADDR 0x20400 268#define SAA9730_LAN_REGS_ADDR 0x20400
269#define SAA9730_LAN_REGS_SIZE 0x00400
268 270
269struct lan_saa9730_regmap { 271struct lan_saa9730_regmap {
270 volatile unsigned int TxBuffA; /* 0x20400 */ 272 volatile unsigned int TxBuffA; /* 0x20400 */
@@ -309,6 +311,7 @@ typedef volatile struct lan_saa9730_regmap t_lan_saa9730_regmap;
309 311
310/* The SAA9730 (EVM) controller register map, as seen via the PCI-bus. */ 312/* The SAA9730 (EVM) controller register map, as seen via the PCI-bus. */
311#define SAA9730_EVM_REGS_ADDR 0x02000 313#define SAA9730_EVM_REGS_ADDR 0x02000
314#define SAA9730_EVM_REGS_SIZE 0x00400
312 315
313struct evm_saa9730_regmap { 316struct evm_saa9730_regmap {
314 volatile unsigned int InterruptStatus1; /* 0x2000 */ 317 volatile unsigned int InterruptStatus1; /* 0x2000 */
@@ -329,16 +332,32 @@ typedef volatile struct evm_saa9730_regmap t_evm_saa9730_regmap;
329 332
330 333
331struct lan_saa9730_private { 334struct lan_saa9730_private {
335 /*
336 * Rx/Tx packet buffers.
337 * The Rx and Tx packets must be PACKET_SIZE aligned.
338 */
339 void *buffer_start;
340 unsigned int buffer_size;
341
342 /*
343 * DMA address of beginning of this object, returned
344 * by pci_alloc_consistent().
345 */
346 dma_addr_t dma_addr;
347
348 /* Pointer to the associated pci device structure */
349 struct pci_dev *pci_dev;
350
332 /* Pointer for the SAA9730 LAN controller register set. */ 351 /* Pointer for the SAA9730 LAN controller register set. */
333 t_lan_saa9730_regmap *lan_saa9730_regs; 352 t_lan_saa9730_regmap *lan_saa9730_regs;
334 353
335 /* Pointer to the SAA9730 EVM register. */ 354 /* Pointer to the SAA9730 EVM register. */
336 t_evm_saa9730_regmap *evm_saa9730_regs; 355 t_evm_saa9730_regmap *evm_saa9730_regs;
337 356
338 /* TRUE if the next buffer to write is RxBuffA, FALSE if RxBuffB. */
339 unsigned char NextRcvToUseIsA;
340 /* Rcv buffer Index. */ 357 /* Rcv buffer Index. */
341 unsigned char NextRcvPacketIndex; 358 unsigned char NextRcvPacketIndex;
359 /* Next buffer index. */
360 unsigned char NextRcvBufferIndex;
342 361
343 /* Index of next packet to use in that buffer. */ 362 /* Index of next packet to use in that buffer. */
344 unsigned char NextTxmPacketIndex; 363 unsigned char NextTxmPacketIndex;
@@ -353,13 +372,8 @@ struct lan_saa9730_private {
353 unsigned char DmaRcvPackets; 372 unsigned char DmaRcvPackets;
354 unsigned char DmaTxmPackets; 373 unsigned char DmaTxmPackets;
355 374
356 unsigned char RcvAIndex; /* index into RcvBufferSpace[] for Blk A */ 375 void *TxmBuffer[LAN_SAA9730_BUFFERS][LAN_SAA9730_TXM_Q_SIZE];
357 unsigned char RcvBIndex; /* index into RcvBufferSpace[] for Blk B */ 376 void *RcvBuffer[LAN_SAA9730_BUFFERS][LAN_SAA9730_RCV_Q_SIZE];
358
359 unsigned int
360 TxmBuffer[LAN_SAA9730_BUFFERS][LAN_SAA9730_TXM_Q_SIZE];
361 unsigned int
362 RcvBuffer[LAN_SAA9730_BUFFERS][LAN_SAA9730_RCV_Q_SIZE];
363 unsigned int TxBufferFree[LAN_SAA9730_BUFFERS]; 377 unsigned int TxBufferFree[LAN_SAA9730_BUFFERS];
364 378
365 unsigned char PhysicalAddress[LAN_SAA9730_CAM_ENTRIES][6]; 379 unsigned char PhysicalAddress[LAN_SAA9730_CAM_ENTRIES][6];