Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/i2o Add more LAN defs.



details:   https://anonhg.NetBSD.org/src/rev/55cfe516ca55
branches:  trunk
changeset: 513643:55cfe516ca55
user:      ad <ad%NetBSD.org@localhost>
date:      Mon Aug 06 13:33:49 2001 +0000

description:
Add more LAN defs.

diffstat:

 sys/dev/i2o/i2o.h |  118 +++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 86 insertions(+), 32 deletions(-)

diffs (221 lines):

diff -r 7e989c6b4c21 -r 55cfe516ca55 sys/dev/i2o/i2o.h
--- a/sys/dev/i2o/i2o.h Mon Aug 06 13:25:10 2001 +0000
+++ b/sys/dev/i2o/i2o.h Mon Aug 06 13:33:49 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i2o.h,v 1.6 2001/08/04 16:54:18 ad Exp $       */
+/*     $NetBSD: i2o.h,v 1.7 2001/08/06 13:33:49 ad Exp $       */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -1009,7 +1009,7 @@
        u_int32_t       tcw;
 
        /* SGL follows */
-};
+} __attribute__ ((__packed__));
 
 #define        I2O_LAN_TCW_ACCESS_PRI_MASK     0x00000007
 #define        I2O_LAN_TCW_SUPPRESS_CRC        0x00000008
@@ -1029,7 +1029,7 @@
        u_int32_t       tcw;            /* As per PACKET_SEND. */
 
        /* SGL follows */
-};
+} __attribute__ ((__packed__));
 
 struct i2o_lan_send_reply {
        u_int32_t       msgflags;
@@ -1040,7 +1040,7 @@
        u_int8_t        reserved;
        u_int8_t        reqstatus;
        u_int32_t       tctx[1];
-};
+} __attribute__ ((__packed__));
 
 #define        I2O_LAN_RECEIVE_POST            0x3e
 struct i2o_lan_receive_post {
@@ -1050,16 +1050,7 @@
        u_int32_t       bktcnt;
 
        /* SGL follows */
-};
-
-struct i2o_lan_pdb {
-       u_int32_t       bctx;
-       u_int32_t       pktoff;
-       u_int32_t       pktlen;
-};
-
-#define        I2O_LAN_FRAG_VALID              0x00
-#define        I2O_LAN_FRAG_VALID_MASK         foo
+} __attribute__ ((__packed__));
 
 struct i2o_lan_receive_reply {
        u_int32_t       msgflags;
@@ -1070,8 +1061,7 @@
        u_int8_t        reserved;
        u_int8_t        trlflags;
        u_int32_t       bucketsleft;
-       struct i2o_lan_pdb      pdb[1];
-};
+} __attribute__ ((__packed__));
 
 #define        I2O_LAN_RESET                   0x35
 struct i2o_lan_reset {
@@ -1080,7 +1070,7 @@
        u_int32_t       msgictx;
        u_int16_t       reserved;
        u_int16_t       resrcflags;
-};
+} __attribute__ ((__packed__));
 
 #define        I2O_LAN_RESRC_RETURN_BUCKETS    0x0001
 #define        I2O_LAN_RESRC_RETURN_XMITS      0x0002
@@ -1092,7 +1082,7 @@
        u_int32_t       msgictx;
        u_int16_t       reserved;
        u_int16_t       resrcflags;     /* As per RESET. */
-};
+} __attribute__ ((__packed__));
 
 #define        I2O_LAN_DSC_SUCCESS                     0x00
 #define        I2O_LAN_DSC_DEVICE_FAILURE              0x01
@@ -1129,7 +1119,7 @@
        u_int8_t        hwaddr[8];
        u_int64_t       maxtxbps;
        u_int64_t       maxrxbps;
-};
+} __attribute__ ((__packed__));
 
 #define        I2O_LAN_TYPE_ETHERNET           0x0030
 #define        I2O_LAN_TYPE_100BASEVG          0x0040
@@ -1147,7 +1137,7 @@
        u_int32_t       maxmcastaddr;
        u_int32_t       maxfilterperfect;
        u_int32_t       maxfilterimperfect;
-};
+} __attribute__ ((__packed__));
 
 #define        I2O_PARAM_LAN_MCAST_MAC_ADDRESS 0x0002
 /*
@@ -1157,21 +1147,24 @@
 #define        I2O_PARAM_LAN_BATCH_CONTROL     0x0003
 struct i2o_param_lan_batch_control {
        u_int32_t       batchflags;
-       u_int32_t       risingloaddly;
-       u_int32_t       risingloadthresh;
-       u_int32_t       fallingloaddly;
-       u_int32_t       fallingloadthresh;
-       u_int32_t       maxbatchcount;
-       u_int32_t       maxbatchdelay;
-       u_int32_t       transcompdelay;
-};
+       u_int32_t       risingloaddly;          /* 1.5 only */
+       u_int32_t       risingloadthresh;       /* 1.5 only */
+       u_int32_t       fallingloaddly;         /* 1.5 only */
+       u_int32_t       fallingloadthresh;      /* 1.5 only */
+       u_int32_t       maxrxbatchcount;
+       u_int32_t       maxrxbatchdelay;
+       u_int32_t       maxtxbatchdelay;        /* 2.0 (conflict with 1.5) */
+       u_int32_t       maxtxbatchcount;        /* 2.0 only */
+} __attribute__ ((__packed__));
 
 #define        I2O_PARAM_LAN_OPERATION         0x0004
 struct i2o_param_lan_operation {
        u_int32_t       pktprepad;
        u_int32_t       userflags;
        u_int32_t       pktorphanlimit;
-};
+       u_int32_t       txmodesenable;          /* 2.0 only */
+       u_int32_t       rxmodesenable;          /* 2.0 only */
+} __attribute__ ((__packed__));
 
 #define        I2O_PARAM_LAN_MEDIA_OPERATION   0x0005
 struct i2o_param_lan_media_operation {
@@ -1181,8 +1174,11 @@
        u_int32_t       currxbps;
        u_int8_t        fullduplex;
        u_int8_t        linkstatus;
-       u_int8_t        badpkthandling;
-};
+       u_int8_t        badpkthandling;         /* v1.5 only */
+       u_int8_t        duplextarget;           /* v2.0 only */
+       u_int32_t       connectortarget;        /* v2.0 only */
+       u_int32_t       connectiontarget;       /* v2.0 only */
+} __attribute__ ((__packed__));
 
 #define        I2O_LAN_CONNECTOR_OTHER         0x00
 #define        I2O_LAN_CONNECTOR_UNKNOWN       0x01
@@ -1214,8 +1210,13 @@
 #define        I2O_LAN_CONNECTION_ETHERNET_100BASETX   0x030a
 #define        I2O_LAN_CONNECTION_ETHERNET_100BASEFX   0x030b
 #define        I2O_LAN_CONNECTION_ETHERNET_100BASET4   0x030c
+#define        I2O_LAN_CONNECTION_ETHERNET_1000BASESX  0x030d
+#define        I2O_LAN_CONNECTION_ETHERNET_1000BASELX  0x030e
+#define        I2O_LAN_CONNECTION_ETHERNET_1000BASECX  0x030f
+#define        I2O_LAN_CONNECTION_ETHERNET_1000BASET   0x0310
 
-#define        I2O_LAN_CONNECTION_100BASEVG_100BASEVG  0x0401
+#define        I2O_LAN_CONNECTION_100BASEVG_ETHERNET   0x0401
+#define        I2O_LAN_CONNECTION_100BASEVG_TOKEN_RING 0x0402
 
 #define        I2O_LAN_CONNECTION_TOKEN_RING_4MBIT     0x0501
 #define        I2O_LAN_CONNECTION_TOKEN_RING_16MBIT    0x0502
@@ -1230,4 +1231,57 @@
 #define        I2O_LAN_CONNECTION_OTHER_EMULATED       0x0f00
 #define        I2O_LAN_CONNECTION_OTHER_OTHER          0x0f01
 
+#define        I2O_LAN_CONNECTION_DEFAULT              0xffffffff
+
+#define        I2O_PARAM_LAN_TRANSMIT_INFO     0x0007
+struct i2o_param_lan_transmit_info {
+       u_int32_t       maxpktsg;
+       u_int32_t       maxchainsg;
+       u_int32_t       maxoutstanding;
+       u_int32_t       maxpktsout;
+       u_int32_t       maxpktsreq;
+       u_int32_t       txmodes;
+} __attribute__ ((__packed__));
+
+#define        I2O_LAN_MODES_NO_DA_IN_SGL              0x0002
+#define        I2O_LAN_MODES_CRC_SUPPRESSION           0x0004
+#define        I2O_LAN_MODES_LOOPBACK_SUPPRESSION      0x0004  /* 1.5 only */
+#define        I2O_LAN_MODES_FCS_RECEPTION             0x0008  /* 2.0 only */
+#define        I2O_LAN_MODES_MAC_INSERTION             0x0010
+#define        I2O_LAN_MODES_RIF_INSERTION             0x0020
+#define        I2O_LAN_MODES_IPV4_CHECKSUM             0x0100  /* 2.0 only */
+#define        I2O_LAN_MODES_TCP_CHECKSUM              0x0200  /* 2.0 only */
+#define        I2O_LAN_MODES_UDP_CHECKSUM              0x0400  /* 2.0 only */
+#define        I2O_LAN_MODES_RSVP_CHECKSUM             0x0800  /* 2.0 only */
+#define        I2O_LAN_MODES_ICMP_CHECKSUM             0x1000  /* 2.0 only */
+
+#define        I2O_PARAM_LAN_RECEIVE_INFO      0x0008
+struct i2o_param_lan_receive_info {
+       u_int32_t       maxchain;
+       u_int32_t       maxbuckets;
+} __attribute__ ((__packed__));
+
+#define        I2O_PARAM_LAN_STATS             0x0009
+struct i2o_param_lan_stats {
+       u_int64_t       opackets;
+       u_int64_t       obytes;
+       u_int64_t       ipackets;
+       u_int64_t       oerrors;
+       u_int64_t       ierrors;
+       u_int64_t       rxnobuffer;
+       u_int64_t       resetcount;
+} __attribute__ ((__packed__));
+
+#define        I2O_PARAM_LAN_802_3_STATS       0x0200
+struct i2o_param_lan_802_3_stats {
+       u_int64_t       alignmenterror;
+       u_int64_t       onecollision;
+       u_int64_t       manycollisions;
+       u_int64_t       deferred;
+       u_int64_t       latecollision;
+       u_int64_t       maxcollisions;
+       u_int64_t       carrierlost;
+       u_int64_t       excessivedeferrals;
+} __attribute__ ((__packed__));
+
 #endif /* !defined _I2O_I2O_H_ */



Home | Main Index | Thread Index | Old Index