Lines Matching defs:softc

128 	struct cfcs_softc *softc;
132 softc = &cfcs_softc;
133 bzero(softc, sizeof(*softc));
134 port = &softc->port;
140 snprintf(softc->port_name, sizeof(softc->port_name), "camsim");
141 port->port_name = softc->port_name;
144 port->onoff_arg = softc;
164 softc->wwnn = (random_bits & 0x0000000fffffff00ULL) |
167 softc->wwpn = softc->wwnn + port->targ_port + 1;
168 ctl_port_set_wwns(port, true, softc->wwnn, true, softc->wwpn);
170 softc->wwnn = port->wwnn;
171 softc->wwpn = port->wwpn;
174 softc->devq = cam_simq_alloc(port->num_requested_ctl_io);
175 if (softc->devq == NULL) {
181 softc->sim = cam_sim_alloc(cfcs_action, cfcs_poll, softc->port_name,
182 softc, /*unit*/ 0, NULL, 1,
183 port->num_requested_ctl_io, softc->devq);
184 if (softc->sim == NULL) {
190 if (xpt_bus_register(softc->sim, NULL, 0) != CAM_SUCCESS) {
196 if (xpt_create_path(&softc->path, /*periph*/NULL,
197 cam_sim_path(softc->sim),
201 xpt_bus_deregister(cam_sim_path(softc->sim));
209 if (softc->sim)
210 cam_sim_free(softc->sim, /*free_devq*/ TRUE);
211 else if (softc->devq)
212 cam_simq_free(softc->devq);
219 struct cfcs_softc *softc = &cfcs_softc;
220 struct ctl_port *port = &softc->port;
225 xpt_free_path(softc->path);
226 xpt_bus_deregister(cam_sim_path(softc->sim));
227 cam_sim_free(softc->sim, /*free_devq*/ TRUE);
243 struct cfcs_softc *softc = (struct cfcs_softc *)arg;
246 softc->online = online;
255 cam_sim_path(softc->sim), CAM_TARGET_WILDCARD,
487 struct cfcs_softc *softc;
490 softc = (struct cfcs_softc *)cam_sim_softc(sim);
515 if (softc->online == 0) {
521 io = ctl_alloc_io_nowait(softc->port.ctl_pool_ref);
540 io->io_hdr.nexus.targ_port = softc->port.targ_port;
551 io->scsiio.tag_num = atomic_fetchadd_32(&softc->cur_tag_num, 1);
609 if (softc->online == 0) {
615 io = ctl_alloc_io_nowait(softc->port.ctl_pool_ref);
630 io->io_hdr.nexus.targ_port = softc->port.targ_port;
685 fc->wwnn = softc->wwnn;
686 fc->wwpn = softc->wwpn;
687 fc->port = softc->port.targ_port;
704 if (softc->online == 0) {
710 io = ctl_alloc_io_nowait(softc->port.ctl_pool_ref);
726 io->io_hdr.nexus.targ_port = softc->port.targ_port;
778 cpi->xport_specific.fc.wwnn = softc->wwnn;
779 cpi->xport_specific.fc.wwpn = softc->wwpn;
780 cpi->xport_specific.fc.port = softc->port.targ_port;