drivers/net/ethernet/i825xx/sun3_82586.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/i825xx/sun3_82586.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/i825xx/sun3_82586.h
Extension
.h
Size
10182 bytes
Lines
320
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#define IEOB_NORSET 0x80        /* don't reset the board */
#define IEOB_ONAIR  0x40        /* put us on the air */
#define IEOB_ATTEN  0x20        /* attention! */
#define IEOB_IENAB  0x10        /* interrupt enable */
#define IEOB_XXXXX  0x08        /* free bit */
#define IEOB_XCVRL2 0x04        /* level 2 transceiver? */
#define IEOB_BUSERR 0x02        /* bus error */
#define IEOB_INT    0x01        /* interrupt */

/* where the obio one lives */
#define IE_OBIO 0xc0000
#define IE_IRQ 3

/*
 * where to find the System Configuration Pointer (SCP)
 */
#define SCP_DEFAULT_ADDRESS 0xfffff4


/*
 * System Configuration Pointer Struct
 */

struct scp_struct
{
  unsigned short zero_dum0;	/* has to be zero */
  unsigned char  sysbus;	/* 0=16Bit,1=8Bit */
  unsigned char  zero_dum1;	/* has to be zero for 586 */
  unsigned short zero_dum2;
  unsigned short zero_dum3;
  char          *iscp;		/* pointer to the iscp-block */
};


/*
 * Intermediate System Configuration Pointer (ISCP)
 */
struct iscp_struct
{
  unsigned char  busy;          /* 586 clears after successful init */
  unsigned char  zero_dummy;    /* has to be zero */
  unsigned short scb_offset;    /* pointeroffset to the scb_base */
  char          *scb_base;      /* base-address of all 16-bit offsets */
};

/*
 * System Control Block (SCB)
 */
struct scb_struct
{
  unsigned char rus;
  unsigned char cus;
  unsigned char cmd_ruc;           /* command word: RU part */
  unsigned char cmd_cuc;           /* command word: CU part & ACK */
  unsigned short cbl_offset;    /* pointeroffset, command block list */
  unsigned short rfa_offset;    /* pointeroffset, receive frame area */
  unsigned short crc_errs;      /* CRC-Error counter */
  unsigned short aln_errs;      /* allignmenterror counter */
  unsigned short rsc_errs;      /* Resourceerror counter */
  unsigned short ovrn_errs;     /* OVerrunerror counter */
};

/*
 * possible command values for the command word
 */
#define RUC_MASK	0x0070	/* mask for RU commands */
#define RUC_NOP		0x0000	/* NOP-command */
#define RUC_START	0x0010	/* start RU */
#define RUC_RESUME	0x0020	/* resume RU after suspend */
#define RUC_SUSPEND	0x0030	/* suspend RU */
#define RUC_ABORT	0x0040	/* abort receiver operation immediately */

#define CUC_MASK        0x07  /* mask for CU command */
#define CUC_NOP         0x00  /* NOP-command */
#define CUC_START       0x01  /* start execution of 1. cmd on the CBL */
#define CUC_RESUME      0x02  /* resume after suspend */
#define CUC_SUSPEND     0x03  /* Suspend CU */
#define CUC_ABORT       0x04  /* abort command operation immediately */

#define ACK_MASK        0xf0  /* mask for ACK command */
#define ACK_CX          0x80  /* acknowledges STAT_CX */
#define ACK_FR          0x40  /* ack. STAT_FR */
#define ACK_CNA         0x20  /* ack. STAT_CNA */
#define ACK_RNR         0x10  /* ack. STAT_RNR */

/*
 * possible status values for the status word
 */
#define STAT_MASK       0xf0  /* mask for cause of interrupt */
#define STAT_CX         0x80  /* CU finished cmd with its I bit set */

Annotation

Implementation Notes