MC_START(9E) | Driver Entry Points | MC_START(9E) |
mc_start
, mc_stop
— start and stop device entry points
#include
<sys/mac_provider.h>
int
prefix_m_start
(void
*driver);
void
prefix_m_stop
(void *driver);
illumos DDI specific
The
mc_start
()
entry point for a driver indicates that it should initialize the chip to be
ready to send or receive data. This entry point is guaranteed to be called
before any entry points that are expected to be able to send and receive
data. During this entry point, most devices will allocate DMA resources,
enable the link, and finish performing any necessary device programming.
The
mc_stop
()
entry point for a driver indicates that it should tear down any allocated
resources for the driver and, after the function returns, it is not expected
to perform any additional I/O.
The driver has access to its private data in the
driver argument to either function, which it should
cast to the appropriate structure. The system guarantees that only one of
the
mc_start
()
and mc_stop
() functions will be called at any given
time for a given instance. Similarly, these should not be called at the same
time as a device's attach(9E) or
detach(9E) routine. However, the
driver may have other ongoing routines that it needs to protect against. The
device driver should always apply the appropriate locking techniques needed
to ensure that access to the data in its soft state is protected.
Upon successful completion, device drivers should return
0 for the
mc_start
() entry point. Otherwise, they should
return a non-zero positive error number to indicate the error that
occurred.
May 31, 2016 | OmniOS |