8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / man / man9f / mac_link_update.9f
blobf37990c3c3a52d616f813e9e2bdd3b77a31bc643
1 .\"
2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
5 .\" 1.0 of the CDDL.
6 .\"
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source.  A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
10 .\"
11 .\"
12 .\" Copyright 2016 Joyent, Inc.
13 .\"
14 .Dd May 31, 2016
15 .Dt MAC_LINK_UPDATE 9F
16 .Os
17 .Sh NAME
18 .Nm mac_link_update
19 .Nd inform the MAC layer about a link state change
20 .Sh SYNOPSIS
21 .In sys/mac_provider.h
22 .Ft void
23 .Fo mac_link_update
24 .Fa "mac_handle_t mh"
25 .Fa "link_state_t link"
26 .Fc
27 .Sh INTERFACE LEVEL
28 illumos DDI specific
29 .Sh PARAMETERS
30 .Bl -tag -width Fa
31 .It Fa mh
32 The MAC handle obtained from a call to
33 .Xr mac_register 9F .
34 .It Fa link
35 The current state of the link.
36 For valid link states see the discussion of
37 .Sy MAC_PROP_STATUS
38 in the
39 .Sx PROPERTIES
40 section of
41 .Xr mac 9E .
42 .El
43 .Sh DESCRIPTION
44 The
45 .Fn mac_link_update
46 function is used by device drivers to inform the MAC layer that the
47 state of a link has changed.
48 As discussed in the
49 .Sx Link Updates
50 section of
51 .Xr mac 9E ,
52 the driver should call this whenever it detects that the state of the
53 link has changed.
54 If the state has not changed, then the driver should not call this function.
55 In addition, if the device driver is powering off the link or is transitioning
56 to a state where it can no longer determine the link status, then it should make
57 sure to call this function with the value of
58 .Fa link
59 set to
60 .Sy LINK_STATE_UNKNOWN .
61 .Pp
62 Device drivers should ensure that they're not holding any of their
63 specific locks when calling this function.
64 .Sh CONTEXT
65 The
66 .Fn mac_link_update
67 function may be called from
68 .Sy user ,
69 .Sy kernel ,
71 .Sy interrupt
72 context.
73 .Sh SEE ALSO
74 .Xr mac 9E ,
75 .Xr mac_register 9F