]> git.saurik.com Git - apple/xnu.git/blob - bsd/if/ppc/if_en.h
xnu-344.49.tar.gz
[apple/xnu.git] / bsd / if / ppc / if_en.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25 /*
26 * MacOSX Mace driver
27 * Defines and device state
28 * Dieter Siegmund (dieter@next.com) Thu Feb 27 18:25:33 PST 1997
29 * - ripped off code from MK/LINUX
30 */
31
32 #define PG_SIZE 0x1000UL
33 #define PG_MASK (PG_SIZE - 1UL)
34
35 #define ETHERMTU 1500
36 #define ETHER_RX_NUM_DBDMA_BUFS 32
37 #define ETHERNET_BUF_SIZE (ETHERMTU + 36)
38 #define ETHER_MIN_PACKET 64
39 #define TX_NUM_DBDMA 6
40
41 #define DBDMA_ETHERNET_EOP 0x40
42
43 typedef struct mace_s {
44 struct arpcom en_arpcom;
45 struct mace_board * ereg; /* ethernet register set address */
46 unsigned char macaddr[NUM_EN_ADDR_BYTES]; /* mac address */
47 int chip_id;
48 dbdma_command_t *rv_dma;
49 dbdma_command_t *tx_dma;
50 unsigned char *rv_dma_area;
51 unsigned char *tx_dma_area;
52 unsigned char multi_mask[8]; /* Multicast mask */
53 unsigned char multi_use[64]; /* Per-mask-bit use count */
54 int rv_tail;
55 int rv_head;
56 int tx_busy;
57 int txintr;
58 int rxintr;
59 int txwatchdog;
60 int ready;
61 int promisc; /* IFF_PROMISC state */
62 } mace_t;
63