3c527.h 1.4 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6 7
/*
 *	3COM "EtherLink MC/32" Descriptions
 */

/*
 *	Registers
 */
8

L
Linus Torvalds 已提交
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#define HOST_CMD		0
#define         HOST_CMD_START_RX   (1<<3)
#define         HOST_CMD_SUSPND_RX  (3<<3)
#define         HOST_CMD_RESTRT_RX  (5<<3)

#define         HOST_CMD_SUSPND_TX  3
#define         HOST_CMD_RESTRT_TX  5


#define HOST_STATUS		2
#define		HOST_STATUS_CRR	(1<<6)
#define		HOST_STATUS_CWR	(1<<5)


#define HOST_CTRL		6
#define		HOST_CTRL_ATTN	(1<<7)
#define 	HOST_CTRL_RESET	(1<<6)
#define 	HOST_CTRL_INTE	(1<<2)

#define HOST_RAMPAGE		8

#define HALTED 0
#define RUNNING 1

struct mc32_mailbox
{
35 36 37
 	u16 mbox;
 	u16 data[1];
} __attribute((packed));
L
Linus Torvalds 已提交
38 39 40

struct skb_header
{
41 42 43 44 45 46
	u8 status;
	u8 control;
	u16 next;	/* Do not change! */
	u16 length;
	u32 data;
} __attribute((packed));
L
Linus Torvalds 已提交
47 48 49 50

struct mc32_stats
{
	/* RX Errors */
51 52 53 54 55 56
	u32 rx_crc_errors;
	u32 rx_alignment_errors;
	u32 rx_overrun_errors;
	u32 rx_tooshort_errors;
	u32 rx_toolong_errors;
	u32 rx_outofresource_errors;
L
Linus Torvalds 已提交
57

58
	u32 rx_discarded;  /* via card pattern match filter */
L
Linus Torvalds 已提交
59 60

	/* TX Errors */
61 62 63 64 65
	u32 tx_max_collisions;
	u32 tx_carrier_errors;
	u32 tx_underrun_errors;
	u32 tx_cts_errors;
	u32 tx_timeout_errors;
66

L
Linus Torvalds 已提交
67
	/* various cruft */
68 69 70 71
	u32 dataA[6];
	u16 dataB[5];
	u32 dataC[14];
} __attribute((packed));
L
Linus Torvalds 已提交
72 73 74 75 76 77 78 79 80 81

#define STATUS_MASK	0x0F
#define COMPLETED	(1<<7)
#define COMPLETED_OK	(1<<6)
#define BUFFER_BUSY	(1<<5)

#define CONTROL_EOP	(1<<7)	/* End Of Packet */
#define CONTROL_EOL	(1<<6)	/* End of List */

#define MCA_MC32_ID	0x0041	/* Our MCA ident */
新手
引导
客服 返回
顶部