The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/scsipi/scsi_ctron_ether.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: scsi_ctron_ether.h,v 1.9 2005/12/11 12:23:50 christos Exp $    */
    2 
    3 /*
    4  * SCSI interface description
    5  */
    6 
    7 
    8 /*
    9  * SCSI command format
   10  */
   11 
   12 #define CTRON_ETHERCMD2(OP, SUB) {OP, SUB}
   13 #define CTRON_ETHER_SEND CTRON_ETHERCMD2(0xc, 0x1)
   14 #define CTRON_ETHER_RECV 0xe1
   15 #define CTRON_ETHER_GET_ADDR CTRON_ETHERCMD2(0xc, 0x4)
   16 #define CTRON_ETHER_ADD_PROTO CTRON_ETHERCMD2(0xd, 0x1)
   17 #define CTRON_ETHER_REM_PROTO CTRON_ETHERCMD2(0xd, 0x2)
   18 #define CTRON_ETHER_SET_MODE CTRON_ETHERCMD2(0xd, 0x3)
   19 #define CTRON_ETHER_SET_MULTI CTRON_ETHERCMD2(0xd, 0x4)
   20 #define CTRON_ETHER_REMOVE_MULTI CTRON_ETHERCMD2(0xd, 0x5)
   21 #define CTRON_ETHER_GET_STATS CTRON_ETHERCMD2(0xd, 0x6)
   22 #define CTRON_ETHER_SET_MEDIA CTRON_ETHERCMD2(0xd, 0x07)
   23 #define CTRON_ETHER_GET_MEDIA CTRON_ETHERCMD2(0xd, 0x08)
   24 #define CTRON_ETHER_SET_ADDR CTRON_ETHERCMD2(0xd, 0xA)
   25 #define CTRON_ETHER_LOAD_IMAGE CTRON_ETHERCMD2(0xd, 0x09)
   26 #define IS_RECV(generic) ((generic)->opcode == 0xe1)
   27 #define IS_SEND(generic) ((generic)->opcode == 0xc && (generic)->bytes[0] == 0x1)
   28 
   29 struct scsi_ctron_ether_recv {
   30         u_int8_t opcode;        /* This really *is* all */
   31 };
   32 
   33 struct scsi_ctron_ether_generic {
   34         u_int8_t opcode[2];
   35         u_int8_t byte3;
   36         u_int8_t length[2];
   37         u_int8_t byte6;
   38 };
   39 
   40 struct scsi_ctron_ether_set_mode {
   41         u_int8_t opcode[2];
   42         u_int8_t mode;
   43         u_int8_t length[2];
   44         u_int8_t byte6;
   45 };
   46 
   47 
   48 struct ctron_stats {
   49         u_int32_t  frames_xmit;
   50         u_int32_t  bytes_xmit;
   51         u_int32_t  ucast_xmit;                  /* never incremented? */
   52         u_int32_t  mcast_xmit;                  /* gets ucasts and mcasts?? */
   53         u_int32_t  bcast_xmit;
   54         u_int32_t  defer_xmit;
   55         u_int32_t  sgl_coll;
   56         u_int32_t  multi_coll;
   57         u_int32_t  tot_xmit_err;
   58         u_int32_t  late_coll;
   59         u_int32_t  excess_coll;
   60         u_int32_t  int_err_xmit;
   61         u_int32_t  carr_err;
   62         u_int32_t  media_abort;
   63         u_int32_t  frames_rec;
   64         u_int32_t  bytes_rec;
   65         u_int32_t  ucast_rec;                   /* never incremented? */
   66         u_int32_t  mcast_rec;                   /* gets ucasts and mcasts?? */
   67         u_int32_t  bcast_rec;
   68         u_int32_t  tot_rec_err;
   69         u_int32_t  too_long;
   70         u_int32_t  too_short;
   71         u_int32_t  align_err;
   72         u_int32_t  crc_err;
   73         u_int32_t  len_err;
   74         u_int32_t  int_err_rec;
   75         u_int32_t  sqe_err;
   76 };
   77 
   78 struct scsi_ctron_ether_inquiry_data {
   79 /* standard; */
   80         u_int8_t device;                /* 3 (T_CPU) */
   81         u_int8_t dev_qual2;             /* 0 (fixed) */
   82         u_int8_t version;               /* 0 */
   83         u_int8_t response_format;               /* 0 */
   84         u_int8_t additional_len;        /* 75!! */
   85         u_int8_t unused[2];             /* 0, 0 */
   86         u_int8_t flags;                 /* 0x18 (sync+linked!?) */
   87         char vendor[8];                 /* ie; "Cabletrn" or "CABLETRN" */
   88         char product[16];               /* ie; "EA412/...." */
   89         char revision[4];               /* ie; "0100" or "1.00" */
   90         char extra[8];                  /* ie; "00.00.19" or "01.00.00" */
   91 /* non-standard; */
   92         u_int8_t hwaddr[6];             /* PROM ethernet addr */
   93         u_int8_t swaddr[6];             /* curr ethernet addr */
   94         char date[22];                  /* firmware date string (asciz) */
   95         u_int8_t mtype;                 /* media type?? */
   96         u_int8_t hwport;                /* value of h/w read port?? */
   97 };
   98 
   99 enum scsi_ctron_ether_media {
  100         CMEDIA_PRIMARY=0,               /* twisted pair */
  101         CMEDIA_SECONDARY=1,             /* coax */
  102         CMEDIA_AUTOSENSE=2              /* set_media command only */
  103 };

Cache object: 9061532a502cd0bb54831280c34ba190


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.