Merge commit 'b31320a79e2054c6739b5229259dbf98f3afc547' into merges
[unleashed.git] / share / man / man7d / hme.7d
bloba4fe1d7b578874686b222f4400cc3cf28f54b97e
1 '\" te
2 .\"  Copyright (c) 1995, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" 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]
6 .TH HME 7D "Sep 5, 1995"
7 .SH NAME
8 hme \- SUNW,hme Fast-Ethernet device driver
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/dev/hme\fR
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The  \fBSUNW,hme\fR Fast-Ethernet driver is a multi-threaded, loadable,
19 clonable, STREAMS hardware driver supporting the connectionless Data Link
20 Provider Interface, \fBdlpi\fR(7P), over a  \fBSUNW,hme\fR Fast-Ethernet
21 controller. The motherboard and add-in SBus \fBSUNW,hme\fR controllers of
22 several varieties are supported. Multiple \fBSUNW,hme\fR controllers installed
23 within the system are supported by the driver.
24 .sp
25 .LP
26 The \fBhme\fR driver provides basic support for the \fBSUNW,hme\fR hardware. It
27 is used to handle the  \fBSUNW,hme\fR device. Functions include chip
28 initialization, frame transit and receive, multicast and promiscuous support,
29 and error recovery and reporting. \fBSUNW,hme\fR The \fBSUNW,hme\fR device
30 provides 100Base-TX networking interfaces using SUN's \fBFEPS ASIC\fR and an
31 Internal Transceiver. The FEPS ASIC provides the Sbus interface and MAC
32 functions and the Physical layer functions are provided by the Internal
33 Transceiver which connects to a \fBRJ-45\fR connector. In addition to the RJ-45
34 connector, an  \fBMII\fR (Media Independent Interface) connector is also
35 provided on all  \fBSUNW,hme\fR devices except the  \fBSunSwith SBus adapter\fR
36 board. The MII interface is used to connect to an External Transceiver which
37 may use any physical media (copper or fiber) specified in the 100Base-TX
38 standard. When an External Transceiver is connected to the MII, the driver
39 selects the External Transceiver and disables the Internal Transceiver.
40 .sp
41 .LP
42 The 100Base-TX standard specifies an "auto-negotiation" protocol to
43 automatically select the mode and speed of operation. The Internal transceiver
44 is capable of doing "auto-negotiation" with the remote-end of the link (Link
45 Partner) and receives the capabilities  of the remote end. It selects the
46 \fBHighest Common Denominator\fR mode of operation based on the priorities. It
47 also supports  \fBforced-mode\fR of operation where the driver can select the
48 mode of operation.
49 .SH APPLICATION PROGRAMMING INTERFACE
50 .sp
51 .LP
52 The cloning character-special device  \fB/dev/hme\fR is used to access all
53 \fBSUNW,hme\fR controllers installed within the system.
54 .SS "hme and DLPI"
55 .sp
56 .LP
57 The  \fBhme\fR driver is a "style 2" Data Link Service provider. All
58 \fBM_PROTO\fR and \fBM_PCPROTO\fR type messages are interpreted as \fBDLPI\fR
59 primitives. Valid \fBDLPI\fR primitives are defined in \fB<sys/dlpi.h>.\fR
60 Refer to \fBdlpi\fR(7P) for more information. An explicit \fBDL_ATTACH_REQ\fR
61 message by the user is required to associate the opened stream with a
62 particular device (\fBppa\fR). The \fBppa\fR ID is interpreted as an
63 \fBunsigned long\fR data type and indicates the corresponding device instance
64 (unit) number. An error (\fBDL_ERROR_ACK\fR) is returned by the driver if the
65 \fBppa\fR field value does not correspond to a valid device instance number for
66 this system. The device is initialized on first attach and de-initialized
67 (stopped) at last detach.
68 .sp
69 .LP
70 The values returned by the driver in the \fBDL_INFO_ACK\fR primitive in
71 response to the \fBDL_INFO_REQ\fR from the user are as follows:
72 .RS +4
73 .TP
74 .ie t \(bu
75 .el o
76 The maximum \fBSDU\fR is \fB1500\fR (\fBETHERMTU\fR - defined in
77 <sys/ethernet.h> ).
78 .RE
79 .RS +4
80 .TP
81 .ie t \(bu
82 .el o
83 The minimum \fBSDU\fR is \fB0\fR.
84 .RE
85 .RS +4
86 .TP
87 .ie t \(bu
88 .el o
89 The \fBdlsap\fR address length is \fB8.\fR
90 .RE
91 .RS +4
92 .TP
93 .ie t \(bu
94 .el o
95 The \fBMAC\fR type is \fBDL_ETHER.\fR
96 .RE
97 .RS +4
98 .TP
99 .ie t \(bu
100 .el o
101 The \fBsap\fR length values is \fB\(mi2\fR meaning the physical address
102 component is followed immediately  by a 2 byte \fBsap\fR component within the
103 \fBDLSAP\fR address.
105 .RS +4
107 .ie t \(bu
108 .el o
109 The service mode is \fBDL_CLDLS.\fR
111 .RS +4
113 .ie t \(bu
114 .el o
115 No optional quality of service (QOS) support is included at present so the
116 \fBQOS\fR fields are \fB0\fR.
118 .RS +4
120 .ie t \(bu
121 .el o
122 The provider style is \fBDL_STYLE2.\fR
124 .RS +4
126 .ie t \(bu
127 .el o
128 The version is \fBDL_VERSION_2.\fR
130 .RS +4
132 .ie t \(bu
133 .el o
134 The broadcast address value is Ethernet/IEEE broadcast address
135 (\fB0xFFFFFF\fR).
139 Once in the \fBDL_ATTACHED\fR state, the user must send a \fBDL_BIND_REQ\fR to
140 associate a particular \fBSAP\fR (Service Access Pointer) with the stream. The
141 \fBhme\fR driver interprets the \fBsap\fR field within the \fBDL_BIND_REQ\fR as
142 an Ethernet "type" therefore valid values for the \fBsap\fR field are in the
143 [\fB0\fR-\fB0xFFFF\fR] range.  Only one Ethernet type can be bound to the
144 stream at any time.
147 If the user selects a \fBsap\fR with a value of \fB0\fR, the receiver will be
148 in "802.3 mode". All frames received from the media having a "type" field in
149 the range [\fB0\fR-\fB1500\fR] are assumed to be 802.3 frames and are routed up
150 all open Streams which are bound to \fBsap\fR value \fB0\fR. If more than one
151 Stream is in "802.3 mode" then the frame will be duplicated and routed up
152 multiple Streams as \fBDL_UNITDATA_IND\fR messages.
155 In transmission, the driver checks the \fBsap\fR field of the \fBDL_BIND_REQ\fR
156 if the \fBsap\fR value is \fB0\fR, and if the destination type field is in the
157 range [\fB0\fR-\fB1500\fR]. If either is true, the driver computes the length
158 of the message, not including initial \fBM_PROTO\fR mblk (message block), of
159 all subsequent \fBDL_UNITDATA_REQ\fR messages and transmits 802.3 frames that
160 have this value in the MAC frame header length field.
163 The \fBhme\fR driver \fBDLSAP\fR address format consists of the 6 byte physical
164 (Ethernet) address component followed immediately by the 2 byte \fBsap\fR
165 (type) component producing an 8 byte \fBDLSAP\fR address. Applications should
166 \fInot\fR hardcode to this particular implementation-specific \fBDLSAP\fR
167 address format but use information returned in the \fBDL_INFO_ACK\fR primitive
168 to compose and decompose \fBDLSAP\fR addresses. The \fBsap\fR length, full
169 \fBDLSAP\fR length, and \fBsap\fR/physical ordering are included within the
170 \fBDL_INFO_ACK.\fR The physical address length can be computed by subtracting
171 the \fBsap\fR length from the full \fBDLSAP\fR address length or by issuing the
172 \fBDL_PHYS_ADDR_REQ\fR to obtain the current physical address associated with
173 the stream.
176 Once in the \fBDL_BOUND\fR state, the user may transmit frames on the Ethernet
177 by sending \fBDL_UNITDATA_REQ\fR messages to the \fBhme\fR driver. The
178 \fBhme\fR driver will route received Ethernet frames up all those open and
179 bound streams having a \fBsap\fR which matches the Ethernet type as
180 \fBDL_UNITDATA_IND\fR messages.  Received Ethernet frames are duplicated and
181 routed up multiple open streams if necessary. The \fBDLSAP\fR address contained
182 within the \fBDL_UNITDATA_REQ\fR and \fBDL_UNITDATA_IND\fR messages consists of
183 both the \fBsap\fR (type) and physical (Ethernet) components.
186 In addition to the mandatory connectionless \fBDLPI\fR message set the driver
187 additionally supports the following primitives.
188 .SS "hme Primitives"
191 The \fBDL_ENABMULTI_REQ\fR and \fBDL_DISABMULTI_REQ\fR primitives
192 enable/disable reception of individual multicast group addresses. A set of
193 multicast addresses may be iteratively created and modified on a per-stream
194 basis using these primitives. These primitives are accepted by the driver in
195 any state following \fBDL_ATTACHED.\fR
198 The \fBDL_PROMISCON_REQ\fR and \fBDL_PROMISCOFF_REQ\fR primitives with the
199 \fBDL_PROMISC_PHYS\fR flag set in the \fBdl_level\fR field enables/disables
200 reception of all ("promiscuous mode") frames on the media including frames
201 generated by the local host. When used with the \fBDL_PROMISC_SAP\fR flag set
202 this enables/disables reception of all \fBsap\fR (Ethernet type) values. When
203 used with the \fBDL_PROMISC_MULTI\fR flag set this enables/disables reception
204 of all multicast group addresses. The effect of each is always on a per-stream
205 basis and independent of the other \fBsap\fR and physical level configurations
206 on this stream or other streams.
209 The \fBDL_PHYS_ADDR_REQ\fR primitive returns the 6 octet Ethernet address
210 currently associated (attached) to the stream in the \fBDL_PHYS_ADDR_ACK\fR
211 primitive.  This primitive is valid only in states following a successful
212 \fBDL_ATTACH_REQ.\fR
215 The \fBDL_SET_PHYS_ADDR_REQ\fR primitive changes the 6 octet Ethernet address
216 currently associated (attached) to this stream. The credentials of the process
217 which originally opened this stream must be superuser.  Otherwise \fBEPERM\fR
218 is returned in the \fBDL_ERROR_ACK.\fR This primitive is destructive in that it
219 affects all other current and future streams attached to this device. An
220 \fBM_ERROR\fR is sent up all other streams attached to this device when this
221 primitive is successful on this stream.  Once changed, all streams subsequently
222 opened and attached to this device will obtain this new physical address.  Once
223 changed, the physical address will remain until this primitive is used to
224 change the physical address again or the system is rebooted, whichever comes
225 first.
226 .SS "hme DRIVER"
229 By default, the hme driver performs "auto-negotiation" to  select the
230 \fBmode\fR and  \fBspeed\fR of the link, when the Internal Transceiver is used.
233 When an External Transceiver is connected to the \fBMII\fR interface, the
234 driver selects the External Transceiver for  networking operations. If the
235 External Transceiver supports "auto-negotiation", the driver uses the
236 auto-negotiation procedure to select the link speed and mode. If the External
237 Transceiver does not support auto-negotiation, it will select the highest
238 priority mode supported by the transceiver.
239 .RS +4
241 .ie t \(bu
242 .el o
243 100 Mbps, full-duplex
245 .RS +4
247 .ie t \(bu
248 .el o
249 100 Mbps, half-duplex
251 .RS +4
253 .ie t \(bu
254 .el o
255 10 Mbps, full-duplex
257 .RS +4
259 .ie t \(bu
260 .el o
261 10 Mbps, half-duplex
265 The link can be in one of the  \fI4\fR following modes:
268 These speeds and modes are described in the 100Base-TX standard.
271 The \fIauto\(minegotiation\fR protocol automatically selects:
272 .RS +4
274 .ie t \(bu
275 .el o
276 Operation mode (half-duplex or full-duplex)
278 .RS +4
280 .ie t \(bu
281 .el o
282 Speed (100 Mbps or 10 Mbps)
286 The auto\(minegotiation protocol does the following:
287 .RS +4
289 .ie t \(bu
290 .el o
291 Gets all the modes of operation supported by the Link Partner
293 .RS +4
295 .ie t \(bu
296 .el o
297 Advertises its capabilities to the Link Partner
299 .RS +4
301 .ie t \(bu
302 .el o
303 Selects the highest common denominator mode of operation based on the
304 priorities
308 The \fIinternal\fR \fItransceiver\fR is capable of all of the operating speeds
309 and modes listed above. When the internal transceiver is used, by
310 \fIdefault\fR, auto-negotiation is used to select the speed and the mode of the
311 link and the common mode of operation with the Link Partner.
314 When an \fIexternal\fR \fItransceiver\fR is connected to the  \fBMII\fR
315 interface, the driver selects the external transceiver for networking
316 operations. If the external transceiver supports auto-negotiation:
317 .RS +4
319 .ie t \(bu
320 .el o
321 The driver uses the auto-negotiation procedure to select the link speed and
322 mode.
326 If the external transceiver  \fIdoes\fR \fInot\fR support auto-negotiation
327 .RS +4
329 .ie t \(bu
330 .el o
331 The driver selects the highest priority mode supported by the transceiver.
335 Sometimes, the user may want to select the speed and mode of  the link. The
336 \fBSUNW,hme\fR device supports programmable \fB"IPG"\fR (Inter-Packet Gap)
337 parameters \fBipg1\fR and  \fBipg2\fR. By default, the driver sets \fBipg1\fR
338 to 8  \fBbyte-times\fR and \fBipg2\fR to 4 \fBbyte-times\fR (which are the
339 standard values). Sometimes, the user may want to alter these values depending
340 on whether the driver supports 10 Mbps or 100 Mbps and accordingly, \fBIPG\fR
341 will be set to 9.6 or 0.96 microseconds.
342 .SS "hme Parameter List"
345 The hme driver provides for setting and getting various parameters for the
346 \fBSUNW,hme\fR device. The parameter list includes:
348 .in +2
349 \fBcurrent transceiver status\fR
350 .in -2
352 .in +2
353 \fBcurrent link status\fR
354 .in -2
356 .in +2
357 \fBinter-packet gap\fR
358 .in -2
360 .in +2
361 \fBlocal transceiver capabilities\fR
362 .in -2
364 .in +2
365 \fBlink partner capabilities\fR
366 .in -2
369 The local transceiver has two set of capabilities: one set reflects the
370 capabilities of the \fBhardware\fR, which are  \fBread-only\fR \fB(RO)\fR
371 parameters and the second set reflects the values chosen by the user and is
372 used in  \fBspeed selection\fR. There are \fBread/write\fR \fB(RW)\fR
373 capabilities. At boot time, these two sets of capabilities will be the same.
374 The Link Partner capabilities are also read only parameters because the current
375 default value of these parameters can only be read and cannot be modified.
376 .SH FILES
378 .ne 2
380 \fB\fB/dev/hme\fR\fR
382 .RS 24n
383 \fBhme\fR special character device
387 .ne 2
389 \fB\fB/kernel/drv/hme.conf\fR\fR
391 .RS 24n
392 System-wide default device driver properties
395 .SH SEE ALSO
398 \fBndd\fR(8), \fBnetstat\fR(8), \fBdriver.conf\fR(4), \fBdlpi\fR(7P)