2 * Copyright 1996 The Australian National University.
3 * Copyright 1996 Fujitsu Laboratories Limited
5 * This software may be distributed under the terms of the Gnu
6 * Public License version 2 or later
8 #define BUFFER_MEM 0x40000
12 #define FORMAC 0x60200
15 /* Size of buffer memory */
16 #define BUFFER_SIZE 32768 /* words; 128kB */
19 #define CS0_INT_REQ 0x8000 /* board interrupt request asserted */
20 #define CS0_MAC_IRQ 0x4000 /* FORMAC is requesting interrupt */
21 #define CS0_PHY_IRQ 0x2000 /* PLC is requesting interrupt */
22 #define CS0_LED2 0x1000 /* turn on led 2 */
23 #define CS0_DO_IRQ 0x0200 /* request interrupt */
24 #define CS0_INT_ENABLE 0x0100 /* enable interrupt requests */
25 #define CS0_DMA_ENABLE 0x0080 /* enable DMA requests */
26 #define CS0_DMA_RECV 0x0040 /* DMA requests are in receive dirn. */
27 #define CS0_LED1 0x0010 /* turn on led 1 */
28 #define CS0_LED0 0x0008 /* turn on led 0 (red) */
29 #define CS0_HREQ 0x0007 /* host request to FORMAC */
30 #define CS0_HREQ_WSPEC 0x0002 /* write special frames */
31 #define CS0_HREQ_RECV 0x0003 /* read receive queue */
32 #define CS0_HREQ_WS 0x0004 /* write synchronous queue */
33 #define CS0_HREQ_WA0 0x0005 /* write async queue 0 */
34 #define CS0_HREQ_WA1 0x0006 /* write async queue 1 */
35 #define CS0_HREQ_WA2 0x0007 /* write async queue 2 */
38 #define CS1_THIS_QAF 0x0800 /* this queue almost full */
39 #define CS1_FIFO_TAG 0x0400 /* tag of word at head of fifo */
40 #define CS1_BUF_RD_TAG 0x0200 /* tag of last word read from buffer */
41 #define CS1_BUF_WR_TAG 0x0100 /* tag to write to buffer */
42 #define CS1_TAGMODE 0x0080 /* enable tag mode */
43 #define CS1_RESET_MAC 0x0040 /* reset FORMAC and PLC */
44 #define CS1_RESET_FIFO 0x0020 /* reset FIFO */
45 #define CS1_CLEAR_QAF 0x0010 /* clear queue-almost-full bits */
46 #define CS1_FIFO_LEVEL 0x0007 /* # words in FIFO (0 - 4) */
49 * FDDI Frame Control values.
52 #define FDDI_SMT_NSA 0x4f
53 #define FDDI_FC_LLC 0x50
54 #define FDDI_FC_LLC_MASK 0xf0
57 * Unnumbered LLC format commands
62 #define LLC_DISC_P 0x53
66 #define LLC_TEST_P 0xf3
68 #define LLC_FRMR_P 0x97
72 #define LLC_XID_P 0xbf
73 #define LLC_SABME 0x6f
74 #define LLC_SABME_P 0x7f
77 * Supervisory LLC commands
84 * Info format - dummy only
89 * ISO PDTR 10178 contains among others
91 #define LLC_X25_LSAP 0x7e
92 #define LLC_SNAP_LSAP 0xaa
93 #define LLC_ISO_LSAP 0xfe
96 * Structure of the FDDI MAC header.
99 u_char fddi_fc
; /* frame control field */
100 u_char fddi_dhost
[6]; /* destination address */
101 u_char fddi_shost
[6]; /* source address */
105 * Structure of LLC/SNAP header.
111 u_char snap_org_code
[3];
112 u_short snap_ether_type
;
115 #define FDDI_HDRLEN 13 /* sizeof(struct fddi_header) */
116 #define LLC_SNAPLEN 8 /* bytes for LLC/SNAP header */
117 #define FDDI_HARDHDR_LEN 28 /* Hard header size */
122 /* Types of loopback we can do. */
131 /* Offset from fifo for writing word with tag. */
132 #define FIFO_TAG 0x80
134 #define MAX_FRAME_LEN 4500
136 void set_ring_op(int up
);
137 void rmt_event(int st
);
138 void set_cf_join(int on
);
140 extern struct net_device
*apfddi_device
;
141 extern struct net_device_stats
*apfddi_stats
;