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
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.
12 .\" Copyright 2016 Joyent, Inc.
20 .Nd start and stop device entry points
22 .In sys/mac_provider.h
36 A pointer to the driver's private data that was passed in via the
47 entry point for a driver indicates that it should initialize the chip
48 to be ready to send or receive data.
49 This entry point is guaranteed to be called before any entry points that are
50 expected to be able to send and receive data.
51 During this entry point, most devices will allocate DMA resources, enable the
52 link, and finish performing any necessary device programming.
56 entry point for a driver indicates that it should tear down any
57 allocated resources for the driver and, after the function returns, it is
58 not expected to perform any additional I/O.
60 The driver has access to its private data in the
62 argument to either function, which it should cast to the
63 appropriate structure.
64 The system guarantees that only one of the
68 functions will be called at any given time for a given instance.
69 Similarly, these should not be called at the same time as a device's
74 However, the driver may have other ongoing routines that it needs to protect
76 The device driver should always apply the appropriate locking techniques needed
77 to ensure that access to the data in its soft state is protected.
79 Upon successful completion, device drivers should return
84 Otherwise, they should return a non-zero positive error number to indicate the