xref: /titanic_44/usr/src/man/man9e/mac_capab_transceiver.9e (revision 48a4016cae8aa2b8b3d8b258eb22e0c781912bed)
1*48a4016cSRobert Mustacchi.\"
2*48a4016cSRobert Mustacchi.\" This file and its contents are supplied under the terms of the
3*48a4016cSRobert Mustacchi.\" Common Development and Distribution License ("CDDL"), version 1.0.
4*48a4016cSRobert Mustacchi.\" You may only use this file in accordance with the terms of version
5*48a4016cSRobert Mustacchi.\" 1.0 of the CDDL.
6*48a4016cSRobert Mustacchi.\"
7*48a4016cSRobert Mustacchi.\" A full copy of the text of the CDDL should have accompanied this
8*48a4016cSRobert Mustacchi.\" source.  A copy of the CDDL is also available via the Internet at
9*48a4016cSRobert Mustacchi.\" http://www.illumos.org/license/CDDL.
10*48a4016cSRobert Mustacchi.\"
11*48a4016cSRobert Mustacchi.\"
12*48a4016cSRobert Mustacchi.\" Copyright (c) 2017, Joyent, Inc.
13*48a4016cSRobert Mustacchi.\"
14*48a4016cSRobert Mustacchi.Dd Mar 24, 2017
15*48a4016cSRobert Mustacchi.Dt MAC_CAPAB_TRANSCEIVER 9E
16*48a4016cSRobert Mustacchi.Os
17*48a4016cSRobert Mustacchi.Sh NAME
18*48a4016cSRobert Mustacchi.Nm mac_capab_transciever ,
19*48a4016cSRobert Mustacchi.Nm mct_info ,
20*48a4016cSRobert Mustacchi.Nm mct_read
21*48a4016cSRobert Mustacchi.Nd MAC capability for networking transceivers
22*48a4016cSRobert Mustacchi.Sh SYNOPSIS
23*48a4016cSRobert Mustacchi.In sys/mac_provider.h
24*48a4016cSRobert Mustacchi.Vt typedef struct mac_capab_transceiver mac_capab_transceiver_t;
25*48a4016cSRobert Mustacchi.Ft int
26*48a4016cSRobert Mustacchi.Fo "mct_info"
27*48a4016cSRobert Mustacchi.Fa "void *driver"
28*48a4016cSRobert Mustacchi.Fa "uint_t id"
29*48a4016cSRobert Mustacchi.Fa "mac_transceiver_info_t *infop"
30*48a4016cSRobert Mustacchi.Fc
31*48a4016cSRobert Mustacchi.Ft int
32*48a4016cSRobert Mustacchi.Fo mct_read
33*48a4016cSRobert Mustacchi.Fa "void *driver"
34*48a4016cSRobert Mustacchi.Fa "uint_t id"
35*48a4016cSRobert Mustacchi.Fa "uint_t page"
36*48a4016cSRobert Mustacchi.Fa "void *buf"
37*48a4016cSRobert Mustacchi.Fa "size_t nbytes"
38*48a4016cSRobert Mustacchi.Fa "off_t offset"
39*48a4016cSRobert Mustacchi.Fa "size_t *nread"
40*48a4016cSRobert Mustacchi.Fc
41*48a4016cSRobert Mustacchi.Sh INTERFACE LEVEL
42*48a4016cSRobert Mustacchi.Sy Volatile -
43*48a4016cSRobert MustacchiThis interface is still evolving in illumos.
44*48a4016cSRobert MustacchiAPI and ABI stability is
45*48a4016cSRobert Mustacchinot guaranteed.
46*48a4016cSRobert Mustacchi.Sh PARAMETERS
47*48a4016cSRobert Mustacchi.Bl -tag -width Fa
48*48a4016cSRobert Mustacchi.It Fa driver
49*48a4016cSRobert MustacchiA pointer to the driver's private data that was passed in via the
50*48a4016cSRobert Mustacchi.Sy m_pdata
51*48a4016cSRobert Mustacchimember of the
52*48a4016cSRobert Mustacchi.Xr mac_register 9S
53*48a4016cSRobert Mustacchistructure to the
54*48a4016cSRobert Mustacchi.Xr mac_register 9F
55*48a4016cSRobert Mustacchifunction.
56*48a4016cSRobert Mustacchi.It Fa id
57*48a4016cSRobert MustacchiAn integer value indicating which transceiver is being inquired about.
58*48a4016cSRobert Mustacchi.It Fa infop
59*48a4016cSRobert MustacchiAn opaque structure which is used to set information about the
60*48a4016cSRobert Mustacchitransceiver.
61*48a4016cSRobert Mustacchi.It Fa page
62*48a4016cSRobert MustacchiA value that indicates which page from the i2c bus is being requested.
63*48a4016cSRobert Mustacchi.It Fa buf
64*48a4016cSRobert MustacchiA pointer to which data should be written to when reading from the
65*48a4016cSRobert Mustacchidevice.
66*48a4016cSRobert Mustacchi.It Fa nbytes
67*48a4016cSRobert MustacchiA value indicating the number of bytes being asked to read into
68*48a4016cSRobert Mustacchi.Fa buf .
69*48a4016cSRobert Mustacchi.It Fa offset
70*48a4016cSRobert MustacchiA value indicating the offset into the page to start reading data.
71*48a4016cSRobert Mustacchi.It Fa nread
72*48a4016cSRobert MustacchiA value to be updated by the driver with the number of successfully read
73*48a4016cSRobert Mustacchibytes.
74*48a4016cSRobert Mustacchi.El
75*48a4016cSRobert Mustacchi.Sh DESCRIPTION
76*48a4016cSRobert MustacchiThe
77*48a4016cSRobert Mustacchi.Sy MAC_CAPAB_TRANSCEIVER
78*48a4016cSRobert Mustacchicapability allows for GLDv3 networking device drivers to provide
79*48a4016cSRobert Mustacchiinformation to the system about their transceiver.
80*48a4016cSRobert MustacchiImplementing this capability is optional.
81*48a4016cSRobert MustacchiFor more information on how to handle capabilities and how to indicate
82*48a4016cSRobert Mustacchithat a capability is not supported, see
83*48a4016cSRobert Mustacchi.Xr mc_getcapab 9E .
84*48a4016cSRobert Mustacchi.Pp
85*48a4016cSRobert MustacchiThis capability should be implemented if the device in question supports
86*48a4016cSRobert Mustacchia Small Form Factor (SFF) transceiver.
87*48a4016cSRobert MustacchiThese are more commonly known by names such as SFP, SFP+, SFP28, QSFP+,
88*48a4016cSRobert Mustacchiand QSFP28.
89*48a4016cSRobert MustacchiThis interface does not apply to traditional copper Ethernet phys.
90*48a4016cSRobert MustacchiThese transceivers provide standardized information over the i2c bus at
91*48a4016cSRobert Mustacchispecific pages.
92*48a4016cSRobert Mustacchi.Ss Supported Standards
93*48a4016cSRobert Mustacchi.Bl -tag -width Sy
94*48a4016cSRobert Mustacchi.It Sy INF-8074
95*48a4016cSRobert MustacchiThe
96*48a4016cSRobert Mustacchi.Sy INF-8084
97*48a4016cSRobert Mustacchistandard was the original multiple source agreement (MSA) for SFP
98*48a4016cSRobert Mustacchidevices.
99*48a4016cSRobert MustacchiIt proposed the original series of management pages at i2c page 0xa0.
100*48a4016cSRobert MustacchiThis page contained up to 512 bytes, however, only the first
101*48a4016cSRobert Mustacchi96 bytes are standardized.
102*48a4016cSRobert MustacchiBytes 97 to 127 are reserved for the vendor.
103*48a4016cSRobert MustacchiThe remaining bytes are reserved by the specification.
104*48a4016cSRobert MustacchiThe management page was subsequently adopted by SFP+ devices.
105*48a4016cSRobert Mustacchi.It Sy SFF-8472
106*48a4016cSRobert MustacchiThe
107*48a4016cSRobert Mustacchi.Sy SFF-8472
108*48a4016cSRobert Mustacchistandard extended the original SFP MSA.
109*48a4016cSRobert MustacchiThis standard added a second i2c page at 0xa2, while maintaining the
110*48a4016cSRobert Mustacchioriginal page at 0xa0.
111*48a4016cSRobert MustacchiThe page at 0xa0 is now explicitly 256 bytes.
112*48a4016cSRobert MustacchiThe page at 0xa2 is also 256 bytes.
113*48a4016cSRobert MustacchiThis standard was also adopted for all SFP28 parts, which are commonly
114*48a4016cSRobert Mustacchiused in transceivers for 25 Gb/s Ethernet.
115*48a4016cSRobert Mustacchi.It Sy SFF-8436
116*48a4016cSRobert MustacchiThe
117*48a4016cSRobert Mustacchi.Sy SFF-8436
118*48a4016cSRobert Mustacchistandard was developed for QSFP+ transceivers, which involve the
119*48a4016cSRobert Mustacchibonding of 4 SFP+ links.
120*48a4016cSRobert MustacchiQSFP+ is commonly used in the transceivers for 40 Gb/s Ethernet.
121*48a4016cSRobert MustacchiThis standard uses i2c page 0xa0 for read-only identification purposes.
122*48a4016cSRobert MustacchiThe lower half of the page is used for control, while the upper 128
123*48a4016cSRobert Mustacchibytes is similar to the
124*48a4016cSRobert Mustacchi.Sy INF-8084
125*48a4016cSRobert Mustacchiand
126*48a4016cSRobert Mustacchi.Sy SFF-8472
127*48a4016cSRobert Mustacchistandards.
128*48a4016cSRobert Mustacchi.It Sy SFF-8636
129*48a4016cSRobert MustacchiThe
130*48a4016cSRobert Mustacchi.Sy SFF-8636
131*48a4016cSRobert Mustacchistandard is a common management standard which is shared between both
132*48a4016cSRobert MustacchiSAS and QSFP+ 28 Gb/s transceivers.
133*48a4016cSRobert MustacchiThe latter transceiver is commonly found in 100 Gb/s Ethernet.
134*48a4016cSRobert MustacchiThe transceiver's memory map is similar to that found in the
135*48a4016cSRobert Mustacchi.Sy SFF-8436
136*48a4016cSRobert Mustacchispecification.
137*48a4016cSRobert MustacchiThe identification information is found in the upper 128
138*48a4016cSRobert Mustacchibytes of page 0xa0, while the lower part of the page is used for
139*48a4016cSRobert Mustacchicontrol, among other purposes.
140*48a4016cSRobert Mustacchi.El
141*48a4016cSRobert Mustacchi.Pp
142*48a4016cSRobert MustacchiThe following table summarizes the above information.
143*48a4016cSRobert Mustacchi.Bl -column "Sy SFF-8636" "1 Gb/s, 10 Gb/s, 25 Gb/s" "256 bytes" "0xa0, 0xa2" -offset indent
144*48a4016cSRobert Mustacchi.Em "Standard" Ta Em Speeds Ta Em Size Ta Em i2c pages
145*48a4016cSRobert Mustacchi.It INF-8074 Ta 1 Gb/s, 10 Gb/s Ta 128 bytes Ta 0xa0
146*48a4016cSRobert Mustacchi.It SFF-8472 Ta 1 Gb/s, 10 Gb/s, 25 GB/s Ta 512 bytes Ta 0xa0, 0xa2
147*48a4016cSRobert Mustacchi.It SFF-8436 Ta 40 Gb/s Ta 256 bytes Ta 0xa0
148*48a4016cSRobert Mustacchi.It SFF-8636 Ta 100 Gb/s Ta 256 bytes Ta 0xa0
149*48a4016cSRobert Mustacchi.El
150*48a4016cSRobert Mustacchi.Ss MAC Capability Structure
151*48a4016cSRobert MustacchiWhen the device driver's
152*48a4016cSRobert Mustacchi.Xr mc_getcapab 9E
153*48a4016cSRobert Mustacchifunction entry point is called with the capability requested set to
154*48a4016cSRobert Mustacchi.Sy MAC_CAPAB_TRANSCEIVER ,
155*48a4016cSRobert Mustacchithen the value of the capability structure is the following structure:
156*48a4016cSRobert Mustacchi.Bd -literal -offset indent
157*48a4016cSRobert Mustacchitypedef struct mac_capab_transceiver {
158*48a4016cSRobert Mustacchi	uint_t	mct_flags;
159*48a4016cSRobert Mustacchi	uint_t	mct_ntransceiveres;
160*48a4016cSRobert Mustacchi	int	(*mct_info)(void *driver, uint_t id,
161*48a4016cSRobert Mustacchi		    mac_transceiver_info_t *infop),
162*48a4016cSRobert Mustacchi	int	(*mct_read)(void *driver, uint_t id, uint_t page,
163*48a4016cSRobert Mustacchi		    void *buf, size_t nbytes, off_t offset,
164*48a4016cSRobert Mustacchi		    size_t *nread)
165*48a4016cSRobert Mustacchi} mac_capab_transceiver_t;
166*48a4016cSRobert Mustacchi.Ed
167*48a4016cSRobert Mustacchi.Pp
168*48a4016cSRobert MustacchiIf the device driver supports the
169*48a4016cSRobert Mustacchi.Sy MAC_CAPAB_TRANSCEIVER
170*48a4016cSRobert Mustacchicapability, it should fill in this structure, based on the following
171*48a4016cSRobert Mustacchirules:
172*48a4016cSRobert Mustacchi.Bl -tag -width Sy
173*48a4016cSRobert Mustacchi.It Sy mct_flags
174*48a4016cSRobert MustacchiThe
175*48a4016cSRobert Mustacchi.Vt mct_flags
176*48a4016cSRobert Mustacchimember is used to negotiate extensions with the driver.
177*48a4016cSRobert MustacchiMAC will set the value of
178*48a4016cSRobert Mustacchi.Vt mct_flags
179*48a4016cSRobert Mustacchito include all of the currently known extensions.
180*48a4016cSRobert MustacchiThe driver should intersect this list with the set that they actually
181*48a4016cSRobert Mustacchisupport.
182*48a4016cSRobert MustacchiAt this time, no such features are defined and the driver should set the
183*48a4016cSRobert Mustacchimember to
184*48a4016cSRobert Mustacchi.Sy 0 .
185*48a4016cSRobert Mustacchi.It Sy mct_ntransceivers
186*48a4016cSRobert MustacchiThe value of
187*48a4016cSRobert Mustacchi.Sy mct_ntransceivers
188*48a4016cSRobert Mustacchiindicates that the number of transceivers present in the device.
189*48a4016cSRobert MustacchiFor most devices, it is expected that this value will be set to one.
190*48a4016cSRobert MustacchiHowever, some devices do support multiple transceivers and PHYs that
191*48a4016cSRobert Mustacchishow up behind a single logical MAC.
192*48a4016cSRobert Mustacchi.Pp
193*48a4016cSRobert MustacchiIt is expected that this value will not change across the lifetime of
194*48a4016cSRobert Mustacchithe device being attached.
195*48a4016cSRobert MustacchiIt is important to remember that this represents the total possible
196*48a4016cSRobert Mustacchinumber of transceivers in the device, not how many are currently present
197*48a4016cSRobert Mustacchiand powered on.
198*48a4016cSRobert Mustacchi.Pp
199*48a4016cSRobert MustacchiThe number of transceivers will influence the
200*48a4016cSRobert Mustacchi.Fa id
201*48a4016cSRobert Mustacchiargument used in the
202*48a4016cSRobert Mustacchi.Fn mct_info
203*48a4016cSRobert Mustacchiand
204*48a4016cSRobert Mustacchi.Fn mct_read
205*48a4016cSRobert Mustacchientry points.
206*48a4016cSRobert MustacchiThe transceiver IDs will start at zero and go to the value of
207*48a4016cSRobert Mustacchi.Fa mct_ntransceivers - 1 .
208*48a4016cSRobert MustacchiIt is up to the driver to keep the mapping between actual transceivers
209*48a4016cSRobert Mustacchiand the transceiver identifiers consistent.
210*48a4016cSRobert Mustacchi.It Sy mct_info
211*48a4016cSRobert MustacchiThe
212*48a4016cSRobert Mustacchi.Fn mct_info
213*48a4016cSRobert Mustacchientry point is used to set basic information about the transceiver.
214*48a4016cSRobert MustacchiThis entry point is
215*48a4016cSRobert Mustacchi.Em required .
216*48a4016cSRobert MustacchiIf the device driver cannot implement this entry point, then it should
217*48a4016cSRobert Mustacchinot indicate that it supports the capability.
218*48a4016cSRobert Mustacchi.Pp
219*48a4016cSRobert MustacchiThe
220*48a4016cSRobert Mustacchi.Fn mct_info
221*48a4016cSRobert Mustacchientry point should fill in information about the transceiver with an
222*48a4016cSRobert Mustacchiidentifier of
223*48a4016cSRobert Mustacchi.Fa id .
224*48a4016cSRobert MustacchiSee the description above of
225*48a4016cSRobert Mustacchi.Sy mct_ntransceivers
226*48a4016cSRobert Mustacchifor more information on how the IDs are determined.
227*48a4016cSRobert Mustacchi.Pp
228*48a4016cSRobert MustacchiThe driver should then proceed to fill in basic information by calling
229*48a4016cSRobert Mustacchithe functions described in the section
230*48a4016cSRobert Mustacchi.Sx Information Functions .
231*48a4016cSRobert MustacchiAfter successfully calling all of the functions, the driver should
232*48a4016cSRobert Mustacchireturn
233*48a4016cSRobert Mustacchi.Sy 0 .
234*48a4016cSRobert MustacchiOthewrise, it should return the appropriate error number.
235*48a4016cSRobert MustacchiFor a full list of error numbers, see
236*48a4016cSRobert Mustacchi.Xr Intro 2 .
237*48a4016cSRobert MustacchiCommon values are:
238*48a4016cSRobert Mustacchi.Bl -tag -width Er -offset width
239*48a4016cSRobert Mustacchi.It Er EINVAL
240*48a4016cSRobert MustacchiThe transceiver identifier
241*48a4016cSRobert Mustacchi.Fa id
242*48a4016cSRobert Mustacchiwas invalid.
243*48a4016cSRobert Mustacchi.It Er ENOTSUP
244*48a4016cSRobert MustacchiThis instance of the devices does not support a transceiver.
245*48a4016cSRobert MustacchiFor example, a device which sometimes has copper PHYs and therefore this
246*48a4016cSRobert Mustacchiinstance does not have any PHYs.
247*48a4016cSRobert Mustacchi.It Er EIO
248*48a4016cSRobert MustacchiAn error occurred while trying to read device registers.
249*48a4016cSRobert MustacchiFor example, an FM-aware device had an error.
250*48a4016cSRobert Mustacchi.El
251*48a4016cSRobert Mustacchi.It Sy mct_read
252*48a4016cSRobert MustacchiThe
253*48a4016cSRobert Mustacchi.Fn mct_read
254*48a4016cSRobert Mustacchifunction is used to read information from a transceiver's i2c bus.
255*48a4016cSRobert MustacchiThe
256*48a4016cSRobert Mustacchi.Fn mct_read
257*48a4016cSRobert Mustacchientry point is an
258*48a4016cSRobert Mustacchi.Em optional
259*48a4016cSRobert Mustacchientry point.
260*48a4016cSRobert Mustacchi.Pp
261*48a4016cSRobert MustacchiThe transceiver should first check the value of
262*48a4016cSRobert Mustacchi.Fa id ,
263*48a4016cSRobert Mustacchiwhich indicates which transceiver information is being requested.
264*48a4016cSRobert MustacchiSee the description above of
265*48a4016cSRobert Mustacchi.Sy mct_ntransceivers
266*48a4016cSRobert Mustacchifor more information on how the IDs are determined.
267*48a4016cSRobert Mustacchi.Pp
268*48a4016cSRobert MustacchiThe driver should try to read up to
269*48a4016cSRobert Mustacchi.Fa nbytes
270*48a4016cSRobert Mustacchiof data from the i2c bus at page
271*48a4016cSRobert Mustacchi.Fa page .
272*48a4016cSRobert MustacchiThe driver should start reading at offset
273*48a4016cSRobert Mustacchi.Fa offset .
274*48a4016cSRobert MustacchiFinally, it should update the value in
275*48a4016cSRobert Mustacchi.Fa nread
276*48a4016cSRobert Mustacchiwith the number of bytes written to the buffer
277*48a4016cSRobert Mustacchi.Fa buf .
278*48a4016cSRobert Mustacchi.Pp
279*48a4016cSRobert MustacchiIf for some reason the driver cannot read all of the requested bytes,
280*48a4016cSRobert Mustacchithat is acceptable.
281*48a4016cSRobert MustacchiInstead it should perform a short read.
282*48a4016cSRobert MustacchiThis may occur because the transceiver does not allow reads at a
283*48a4016cSRobert Mustacchirequested region or the region is shorter than is common for most
284*48a4016cSRobert Mustacchidevices.
285*48a4016cSRobert Mustacchi.Pp
286*48a4016cSRobert MustacchiUpon successful completion, the driver should ensure that
287*48a4016cSRobert Mustacchi.Fa nread
288*48a4016cSRobert Mustacchihas been updated and then return
289*48a4016cSRobert Mustacchi.Sy 0 .
290*48a4016cSRobert MustacchiOtherwise, the driver should return the appropriate error number.
291*48a4016cSRobert MustacchiFor
292*48a4016cSRobert Mustacchia full list of error numbers, see
293*48a4016cSRobert Mustacchi.Xr Intro 2 .
294*48a4016cSRobert MustacchiCommon values are:
295*48a4016cSRobert Mustacchi.Bl -tag -width Er -offset width
296*48a4016cSRobert Mustacchi.It Er EINVAL
297*48a4016cSRobert MustacchiThe value of
298*48a4016cSRobert Mustacchi.Fa id
299*48a4016cSRobert Mustacchirepresented an invalid transceiver identifier.
300*48a4016cSRobert MustacchiThe transceiver i2c page
301*48a4016cSRobert Mustacchi.Fa page
302*48a4016cSRobert Mustacchiis not valid for this type of device.
303*48a4016cSRobert MustacchiThe value of
304*48a4016cSRobert Mustacchi.Fa offset
305*48a4016cSRobert Mustacchiis beyond the range supported for this
306*48a4016cSRobert Mustacchi.Fa page .
307*48a4016cSRobert Mustacchi.It Er EIO
308*48a4016cSRobert MustacchiAn error occurred while trying to read the device i2c pages.
309*48a4016cSRobert Mustacchi.El
310*48a4016cSRobert Mustacchi.El
311*48a4016cSRobert Mustacchi.Ss Transceiver Information Functions
312*48a4016cSRobert MustacchiThe
313*48a4016cSRobert Mustacchi.Fn mct_info
314*48a4016cSRobert Mustacchientry point is the primary required entry point for a device driver
315*48a4016cSRobert Mustacchiwhich supports this capability.
316*48a4016cSRobert MustacchiThe information structure is opaque to the device driver.
317*48a4016cSRobert MustacchiInstead, a series of informational functions is
318*48a4016cSRobert Mustacchiavailable to the device driver to call on the transceiver.
319*48a4016cSRobert MustacchiThe device drivers should try to call and fill in as many of these as
320*48a4016cSRobert Mustacchipossible.
321*48a4016cSRobert MustacchiThere are two different properties that a driver can set:
322*48a4016cSRobert Mustacchi.Bl -enum -offset indent
323*48a4016cSRobert Mustacchi.It
324*48a4016cSRobert MustacchiWhether the transceiver is present.
325*48a4016cSRobert Mustacchi.It
326*48a4016cSRobert MustacchiWhether the transceiver is usable.
327*48a4016cSRobert Mustacchi.El
328*48a4016cSRobert Mustacchi.Pp
329*48a4016cSRobert MustacchiTo set whether or not the transceiver is present, the driver should call
330*48a4016cSRobert Mustacchi.Xr mac_transceiver_info_set_present 9F .
331*48a4016cSRobert MustacchiThis is used to indicate whether the transceiver is plugged in or not.
332*48a4016cSRobert MustacchiIf the transceiver is a part of the NIC, then this function should
333*48a4016cSRobert Mustacchialways be called with the value set to
334*48a4016cSRobert Mustacchi.Dv B_TRUE .
335*48a4016cSRobert Mustacchi.Pp
336*48a4016cSRobert MustacchiFinally, the driver has the ability to provide information about whether
337*48a4016cSRobert Mustacchior not the transceiver is usable or not.
338*48a4016cSRobert MustacchiA transceiver may be present, but not usable, if the hardware and
339*48a4016cSRobert Mustacchifirmware support a limited number of transceivers.
340*48a4016cSRobert MustacchiTo set this information, the driver should call
341*48a4016cSRobert Mustacchi.Xr mac_transceiver_info_set_usable 9F .
342*48a4016cSRobert MustacchiIf the transceiver is not present, then the driver should not call this
343*48a4016cSRobert Mustacchifunction.
344*48a4016cSRobert Mustacchi.Ss Opaque Transceivers
345*48a4016cSRobert MustacchiSome devices abstract the nature of the transceiver and do not allow
346*48a4016cSRobert Mustacchidirect access to the transceiver.
347*48a4016cSRobert MustacchiIn this case, if the device driver still has access to enough
348*48a4016cSRobert Mustacchiinformation to know if the transceiver is at least present, then it
349*48a4016cSRobert Mustacchishould still implement the
350*48a4016cSRobert Mustacchi.Fn mct_info
351*48a4016cSRobert Mustacchientry point.
352*48a4016cSRobert Mustacchi.Ss Locking and Data Access
353*48a4016cSRobert MustacchiCalls to get information about the transceivers may come at the same
354*48a4016cSRobert Mustacchitime as general I/O requests to the device to send or receive data.
355*48a4016cSRobert MustacchiThe driver should make sure that reading data from the i2c bus of the
356*48a4016cSRobert Mustacchitransceiver does not interfere with the device's functionality in this
357*48a4016cSRobert Mustacchiregard.
358*48a4016cSRobert MustacchiDifferent locks should be used.
359*48a4016cSRobert Mustacchi.Pp
360*48a4016cSRobert MustacchiOn some devices, reading from the transceiver's i2c bus might cause a
361*48a4016cSRobert Mustacchidisruption of service to the device.
362*48a4016cSRobert MustacchiFor example, on some devices a phy reset may be required or come about
363*48a4016cSRobert Mustacchias a side effect of trying to read the device.
364*48a4016cSRobert MustacchiIf any kind of disruption would be caused, then the driver
365*48a4016cSRobert Mustacchimust not implement the
366*48a4016cSRobert Mustacchi.Ft mct_read
367*48a4016cSRobert Mustacchientry point.
368*48a4016cSRobert Mustacchi.Sh CONTEXT
369*48a4016cSRobert MustacchiThe various callback functions will be called from
370*48a4016cSRobert Mustacchi.Sy kernel
371*48a4016cSRobert Mustacchicontext.
372*48a4016cSRobert MustacchiThese functions will never be called from
373*48a4016cSRobert Mustacchi.Sy interrupt
374*48a4016cSRobert Mustacchicontext.
375*48a4016cSRobert Mustacchi.Sh SEE ALSO
376*48a4016cSRobert Mustacchi.Xr Intro 2 ,
377*48a4016cSRobert Mustacchi.Xr mac 9E ,
378*48a4016cSRobert Mustacchi.Xr mc_getcapab 9E ,
379*48a4016cSRobert Mustacchi.Xr mac_register 9F ,
380*48a4016cSRobert Mustacchi.Xr mac_transceiver_info_set_present 9F ,
381*48a4016cSRobert Mustacchi.Xr mac_transceiver_info_set_usable 9F ,
382*48a4016cSRobert Mustacchi.Xr mac_register 9S
383*48a4016cSRobert Mustacchi.Rs
384*48a4016cSRobert Mustacchi.%N INF-8074i
385*48a4016cSRobert Mustacchi.%T SFP (Small Formfactor Pluggable) Interface
386*48a4016cSRobert Mustacchi.%Q SFF Committee
387*48a4016cSRobert Mustacchi.%O Revision 1.0
388*48a4016cSRobert Mustacchi.%D May 12, 2001
389*48a4016cSRobert Mustacchi.Re
390*48a4016cSRobert Mustacchi.Rs
391*48a4016cSRobert Mustacchi.%N SFF-8472
392*48a4016cSRobert Mustacchi.%T Diagnostic Monitoring Interface for Optical Transceivers
393*48a4016cSRobert Mustacchi.%O Revision 12.2
394*48a4016cSRobert Mustacchi.%D November 21, 2014
395*48a4016cSRobert Mustacchi.Re
396*48a4016cSRobert Mustacchi.Rs
397*48a4016cSRobert Mustacchi.%N SFF-8436
398*48a4016cSRobert Mustacchi.%T QSFP+ 10 Gbs 4X PLUGGABLE TRANSCEIVER
399*48a4016cSRobert Mustacchi.%O Revision 4.8
400*48a4016cSRobert Mustacchi.%D October 31, 2013
401*48a4016cSRobert Mustacchi.Re
402*48a4016cSRobert Mustacchi.Rs
403*48a4016cSRobert Mustacchi.%N SFF-8636
404*48a4016cSRobert Mustacchi.%T Management Interface for Cabled Environments
405*48a4016cSRobert Mustacchi.%O Revision 2.7
406*48a4016cSRobert Mustacchi.%D January 26, 2016
407*48a4016cSRobert Mustacchi.Re
408