267 nulldev, /* probe */
268 stmf_attach,
269 stmf_detach,
270 nodev, /* reset */
271 &stmf_cb_ops,
272 NULL, /* bus_ops */
273 NULL /* power */
274 };
275
276 #define STMF_NAME "COMSTAR STMF"
277 #define STMF_MODULE_NAME "stmf"
278
279 static struct modldrv modldrv = {
280 &mod_driverops,
281 STMF_NAME,
282 &stmf_ops
283 };
284
285 static struct modlinkage modlinkage = {
286 MODREV_1,
287 &modldrv,
288 NULL
289 };
290
291 int
292 _init(void)
293 {
294 int ret;
295
296 ret = mod_install(&modlinkage);
297 if (ret)
298 return (ret);
299 stmf_trace_buf = kmem_zalloc(stmf_trace_buf_size, KM_SLEEP);
300 trace_buf_size = stmf_trace_buf_size;
301 trace_buf_curndx = 0;
302 mutex_init(&trace_buf_lock, NULL, MUTEX_DRIVER, 0);
303 bzero(&stmf_state, sizeof (stmf_state_t));
304 /* STMF service is off by default */
305 stmf_state.stmf_service_running = 0;
306 /* default lu/lport states are online */
307 stmf_state.stmf_default_lu_state = STMF_STATE_ONLINE;
308 stmf_state.stmf_default_lport_state = STMF_STATE_ONLINE;
|
267 nulldev, /* probe */
268 stmf_attach,
269 stmf_detach,
270 nodev, /* reset */
271 &stmf_cb_ops,
272 NULL, /* bus_ops */
273 NULL /* power */
274 };
275
276 #define STMF_NAME "COMSTAR STMF"
277 #define STMF_MODULE_NAME "stmf"
278
279 static struct modldrv modldrv = {
280 &mod_driverops,
281 STMF_NAME,
282 &stmf_ops
283 };
284
285 static struct modlinkage modlinkage = {
286 MODREV_1,
287 { &modldrv, NULL }
288 };
289
290 int
291 _init(void)
292 {
293 int ret;
294
295 ret = mod_install(&modlinkage);
296 if (ret)
297 return (ret);
298 stmf_trace_buf = kmem_zalloc(stmf_trace_buf_size, KM_SLEEP);
299 trace_buf_size = stmf_trace_buf_size;
300 trace_buf_curndx = 0;
301 mutex_init(&trace_buf_lock, NULL, MUTEX_DRIVER, 0);
302 bzero(&stmf_state, sizeof (stmf_state_t));
303 /* STMF service is off by default */
304 stmf_state.stmf_service_running = 0;
305 /* default lu/lport states are online */
306 stmf_state.stmf_default_lu_state = STMF_STATE_ONLINE;
307 stmf_state.stmf_default_lport_state = STMF_STATE_ONLINE;
|