File: /usr/src/linux-2.4.7/drivers/net/3c527.h

1     /*
2      *	3COM "EtherLink MC/32" Descriptions
3      */
4     
5     /*
6      *	Registers
7      */
8       
9     #define HOST_CMD		0
10     #define         HOST_CMD_START_RX   (1<<3)
11     #define         HOST_CMD_SUSPND_RX  (3<<3)
12     #define         HOST_CMD_RESTRT_RX  (5<<3)
13     
14     #define         HOST_CMD_SUSPND_TX  3
15     #define         HOST_CMD_RESTRT_TX  5
16     
17     
18     #define HOST_STATUS		2
19     #define		HOST_STATUS_CRR	(1<<6)
20     #define		HOST_STATUS_CWR	(1<<5)
21     
22     
23     #define HOST_CTRL		6
24     #define		HOST_CTRL_ATTN	(1<<7)
25     #define 	HOST_CTRL_RESET	(1<<6)
26     #define 	HOST_CTRL_INTE	(1<<2)
27     
28     #define HOST_RAMPAGE		8
29     
30     #define RX_HALTED (1<<0)
31     #define TX_HALTED (1<<1)  
32     #define HALTED (RX_HALTED | TX_HALTED)
33     #define RUNNING 0
34     
35     struct mc32_mailbox
36     {
37     	u16	mbox __attribute((packed));
38     	u16	data[1] __attribute((packed));
39     };
40     
41     struct skb_header
42     {
43     	u8	status __attribute((packed));
44     	u8	control __attribute((packed));
45     	u16	next __attribute((packed));	/* Do not change! */
46     	u16	length __attribute((packed));
47     	u32	data __attribute((packed));
48     };
49     
50     struct mc32_stats
51     {
52     	/* RX Errors */
53     	u32     rx_crc_errors       __attribute((packed)); 	
54     	u32     rx_alignment_errors  __attribute((packed)); 	
55     	u32     rx_overrun_errors    __attribute((packed));
56     	u32     rx_tooshort_errors  __attribute((packed));
57     	u32     rx_toolong_errors   __attribute((packed));
58     	u32     rx_outofresource_errors  __attribute((packed)); 
59     
60     	u32     rx_discarded   __attribute((packed));  /* via card pattern match filter */ 
61     
62     	/* TX Errors */
63     	u32     tx_max_collisions __attribute((packed)); 
64     	u32     tx_carrier_errors __attribute((packed)); 
65     	u32     tx_underrun_errors __attribute((packed)); 
66     	u32     tx_cts_errors     __attribute((packed)); 
67     	u32     tx_timeout_errors __attribute((packed)) ;
68     	
69     	/* various cruft */
70     	u32     dataA[6] __attribute((packed));   
71             u16	dataB[5] __attribute((packed));   
72       	u32     dataC[14] __attribute((packed)); 	
73     };
74     
75     #define STATUS_MASK	0x0F
76     #define COMPLETED	(1<<7)
77     #define COMPLETED_OK	(1<<6)
78     #define BUFFER_BUSY	(1<<5)
79     
80     #define CONTROL_EOP	(1<<7)	/* End Of Packet */
81     #define CONTROL_EOL	(1<<6)	/* End of List */
82     
83     #define MCA_MC32_ID	0x0041	/* Our MCA ident */
84