emlxs_modsym
if (emlxs_modsym.fct_modopen) {
emlxs_modsym.fct_modopen++;
emlxs_modsym.mod_fct = ddi_modopen("drv/fct", KRTLD_MODE_FIRST, &err);
if (!emlxs_modsym.mod_fct) {
emlxs_modsym.mod_stmf =
if (!emlxs_modsym.mod_stmf) {
emlxs_modsym.fct_alloc = (void *(*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_alloc == NULL) {
emlxs_modsym.fct_free = (void (*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_free == NULL) {
emlxs_modsym.fct_scsi_task_alloc =
uint16_t, uint16_t))ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_scsi_task_alloc == NULL) {
emlxs_modsym.fct_register_local_port =
(int (*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_register_local_port == NULL) {
emlxs_modsym.fct_deregister_local_port =
(void (*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_deregister_local_port == NULL) {
emlxs_modsym.fct_handle_event =
(void (*)())ddi_modsym(emlxs_modsym.mod_fct, "fct_handle_event",
if ((void *)emlxs_modsym.fct_handle_event == NULL) {
emlxs_modsym.fct_post_rcvd_cmd =
(void (*)())ddi_modsym(emlxs_modsym.mod_fct, "fct_post_rcvd_cmd",
if ((void *)emlxs_modsym.fct_post_rcvd_cmd == NULL) {
emlxs_modsym.fct_ctl = (void (*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_ctl == NULL) {
emlxs_modsym.fct_queue_cmd_for_termination =
(void (*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_queue_cmd_for_termination == NULL) {
emlxs_modsym.fct_send_response_done =
(void (*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_send_response_done == NULL) {
emlxs_modsym.fct_send_cmd_done =
(void (*)())ddi_modsym(emlxs_modsym.mod_fct, "fct_send_cmd_done",
if ((void *)emlxs_modsym.fct_send_cmd_done == NULL) {
emlxs_modsym.fct_scsi_data_xfer_done =
(void (*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_scsi_data_xfer_done == NULL) {
emlxs_modsym.fct_port_shutdown =
(fct_status_t(*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_port_shutdown == NULL) {
emlxs_modsym.fct_port_initialize =
(fct_status_t(*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_port_initialize == NULL) {
emlxs_modsym.fct_cmd_fca_aborted =
(void (*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_cmd_fca_aborted == NULL) {
emlxs_modsym.fct_handle_rcvd_flogi =
(fct_status_t(*)())ddi_modsym(emlxs_modsym.mod_fct,
if ((void *)emlxs_modsym.fct_handle_rcvd_flogi == NULL) {
emlxs_modsym.stmf_alloc =
(void *(*)())ddi_modsym(emlxs_modsym.mod_stmf, "stmf_alloc",
if ((void *)emlxs_modsym.stmf_alloc == NULL) {
emlxs_modsym.stmf_free = (void (*)())ddi_modsym(emlxs_modsym.mod_stmf,
if ((void *)emlxs_modsym.stmf_free == NULL) {
emlxs_modsym.stmf_deregister_port_provider =
(void (*)())ddi_modsym(emlxs_modsym.mod_stmf,
if ((void *)emlxs_modsym.stmf_deregister_port_provider == NULL) {
emlxs_modsym.stmf_register_port_provider =
(int (*)())ddi_modsym(emlxs_modsym.mod_stmf,
if ((void *)emlxs_modsym.stmf_register_port_provider == NULL) {
if (emlxs_modsym.fct_modopen == 0) {
emlxs_modsym.fct_modopen--;
if (emlxs_modsym.fct_modopen) {
if (emlxs_modsym.mod_fct) {
(void) ddi_modclose(emlxs_modsym.mod_fct);
emlxs_modsym.mod_fct = 0;
if (emlxs_modsym.mod_stmf) {
(void) ddi_modclose(emlxs_modsym.mod_stmf);
emlxs_modsym.mod_stmf = 0;
emlxs_modsym.fct_alloc = NULL;
emlxs_modsym.fct_free = NULL;
emlxs_modsym.fct_scsi_task_alloc = NULL;
emlxs_modsym.fct_register_local_port = NULL;
emlxs_modsym.fct_deregister_local_port = NULL;
emlxs_modsym.fct_handle_event = NULL;
emlxs_modsym.fct_ctl = NULL;
emlxs_modsym.fct_queue_cmd_for_termination = NULL;
emlxs_modsym.fct_send_response_done = NULL;
emlxs_modsym.fct_send_cmd_done = NULL;
emlxs_modsym.fct_scsi_data_xfer_done = NULL;
emlxs_modsym.fct_port_shutdown = NULL;
emlxs_modsym.fct_port_initialize = NULL;
emlxs_modsym.fct_cmd_fca_aborted = NULL;
emlxs_modsym.fct_handle_rcvd_flogi = NULL;
emlxs_modsym.stmf_alloc = NULL;
emlxs_modsym.stmf_free = NULL;
emlxs_modsym.stmf_deregister_port_provider = NULL;
emlxs_modsym.stmf_register_port_provider = NULL;
emlxs_modsym_t emlxs_modsym; /* uses emlxs_device.lock */
if (emlxs_modsym.mod_fctl) {
emlxs_modsym.mod_fctl =
if (!emlxs_modsym.mod_fctl) {
emlxs_modsym.fc_fca_attach =
(int (*)())ddi_modsym(emlxs_modsym.mod_fctl, "fc_fca_attach",
if ((void *)emlxs_modsym.fc_fca_attach == NULL) {
emlxs_modsym.fc_fca_detach =
(int (*)())ddi_modsym(emlxs_modsym.mod_fctl, "fc_fca_detach",
if ((void *)emlxs_modsym.fc_fca_detach == NULL) {
emlxs_modsym.fc_fca_init =
(int (*)())ddi_modsym(emlxs_modsym.mod_fctl, "fc_fca_init", &err);
if ((void *)emlxs_modsym.fc_fca_init == NULL) {
if (emlxs_modsym.mod_fctl) {
(void) ddi_modclose(emlxs_modsym.mod_fctl);
emlxs_modsym.mod_fctl = 0;
emlxs_modsym.fc_fca_attach = NULL;
emlxs_modsym.fc_fca_detach = NULL;
emlxs_modsym.fc_fca_init = NULL;
bzero(&emlxs_modsym, sizeof (emlxs_modsym_t));
extern emlxs_modsym_t emlxs_modsym;
#define MODSYM(_f) emlxs_modsym._f