Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/ctl/ctl_frontend.c
Context not available. | |||||
#include <sys/endian.h> | #include <sys/endian.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <sys/nv.h> | |||||
#include <sys/dnv.h> | |||||
#include <cam/scsi/scsi_all.h> | #include <cam/scsi/scsi_all.h> | ||||
#include <cam/scsi/scsi_da.h> | #include <cam/scsi/scsi_da.h> | ||||
Context not available. | |||||
} | } | ||||
port->targ_port = port_num; | port->targ_port = port_num; | ||||
port->ctl_pool_ref = pool; | port->ctl_pool_ref = pool; | ||||
if (port->options.stqh_first == NULL) | if (port->options == NULL) | ||||
STAILQ_INIT(&port->options); | port->options = nvlist_create(0); | ||||
port->stats.item = port_num; | port->stats.item = port_num; | ||||
mtx_init(&port->port_lock, "CTL port", NULL, MTX_DEF); | mtx_init(&port->port_lock, "CTL port", NULL, MTX_DEF); | ||||
Context not available. | |||||
mtx_unlock(&softc->ctl_lock); | mtx_unlock(&softc->ctl_lock); | ||||
ctl_pool_free(pool); | ctl_pool_free(pool); | ||||
ctl_free_opts(&port->options); | nvlist_destroy(port->options); | ||||
ctl_lun_map_deinit(port); | ctl_lun_map_deinit(port); | ||||
free(port->port_devid, M_CTL); | free(port->port_devid, M_CTL); | ||||
Context not available. | |||||
port->port_online(port->onoff_arg); | port->port_online(port->onoff_arg); | ||||
mtx_lock(&softc->ctl_lock); | mtx_lock(&softc->ctl_lock); | ||||
if (softc->is_single == 0) { | if (softc->is_single == 0) { | ||||
value = ctl_get_opt(&port->options, "ha_shared"); | value = dnvlist_get_string(port->options, "ha_shared", NULL); | ||||
if (value != NULL && strcmp(value, "on") == 0) | if (value != NULL && strcmp(value, "on") == 0) | ||||
port->status |= CTL_PORT_STATUS_HA_SHARED; | port->status |= CTL_PORT_STATUS_HA_SHARED; | ||||
else | else | ||||
Context not available. |