smcp.h revision ae115bc77f6fcde83175c75b4206dc2e50747966
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1998, by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SMCP_H
#define _SMCP_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Driver declarations for the SMC Generic UMAC driver
*/
#ifdef __cplusplus
extern "C" {
#endif
/* debug flags */
#define SMCGTRACE 0x01
#define SMCGERRS 0x02
#define SMCGRECV 0x04
#define SMCGDDI 0x08
#define SMCGSEND 0x10
#define SMCGINT 0x20
#define SMCGALAN 0x40
/* Misc */
/* Definitions for the field bus_type */
#define SMCG_AT_BUS 0x00
#define SMCG_EISA_BUS 0x02
#define SMCG_PCI_BUS 0x03
/* Function declarations */
int LM_Nextcard(Adapter_Struc *);
void LM_Get_Addr(Adapter_Struc *);
void LM_Set_Addr(Adapter_Struc *);
void LM_Reset_Adapter(Adapter_Struc *);
int LM_GetCnfg(Adapter_Struc *);
int LM_Initialize_Adapter(Adapter_Struc *);
int LM_Open_Adapter(Adapter_Struc *);
int LM_Close_Adapter(Adapter_Struc *);
int LM_Add_Multi_Address(Adapter_Struc *);
int LM_Delete_Multi_Address(Adapter_Struc *);
int LM_Change_Receive_Mask(Adapter_Struc *);
int LM_Service_Events(Adapter_Struc *);
int LM_Disable_Adapter(Adapter_Struc *);
int LM_Enable_Adapter(Adapter_Struc *);
int LM_Get_Host_Ram_Size(Adapter_Struc *);
void LM_Reap_Xmits(Adapter_Struc *);
int UM_Receive_Packet(char *, unsigned short, Adapter_Struc *, int,
Data_Buff_Structure **);
int UM_Status_Change(Adapter_Struc *);
int UM_Send_Complete(int, Adapter_Struc *);
int UM_Interrupt(Adapter_Struc *);
struct smcg_rx_buffer_desc {
struct smcg_rx_buffer_desc *next;
};
struct txpkt_info {
int handles_bound;
};
/* SMC Generic UMAC structure */
typedef
struct smcg_info {
int smcg_multicount; /* current multicast count */
int smcg_need_gld_sched; /* flag */
/* Stuff for keeping track of receive buffers */
struct smcg_rx_buffer_desc *rx_freelist;
int rx_ring_index;
int rx_bufs_outstanding;
int detaching_flag;
/* Stuff for keeping track of transmit packets */
int tx_ring_head;
int tx_ring_tail;
/* Stuff for keeping track of LMAC */
/* Storage for statistics */
/* Stats added in conversion to v2 */
} smcg_t;
/*
* **************************************************************************
* Definitions for the field:
* line_speed
* Note: copied from lmstruct.h
*/
#define LINE_SPEED_UNKNOWN 0x0000
#define LINE_SPEED_4 0x0001
#define LINE_SPEED_10 0x0002
#define LINE_SPEED_16 0x0004
#define LINE_SPEED_100 0x0008
#define LINE_SPEED_FULL_DUPLEX 0x8000
/*
* **************************************************************************
* Definitions for the field:
* media_type2
* Note: copied from lmstruct.h
*/
#define MEDIA_TYPE_MII 0x0001
#define MEDIA_TYPE_UTP 0x0002
#define MEDIA_TYPE_BNC 0x0004
#define MEDIA_TYPE_AUI 0x0008
#define MEDIA_TYPE_S10 0x0010
#define MEDIA_TYPE_AUTO_SENSE 0x1000
#define MEDIA_TYPE_AUTO_DETECT 0x4000
#define MEDIA_TYPE_AUTO_NEGOTIATE 0x8000
#ifdef __cplusplus
}
#endif
#endif /* _SMCP_H */