Lines Matching defs:im_port

29 static void bfad_im_fc_rport_add(struct bfad_im_port_s  *im_port,
172 struct bfad_im_port_s *im_port =
174 struct bfad_s *bfad = im_port->bfad;
193 struct bfad_im_port_s *im_port =
195 struct bfad_s *bfad = im_port->bfad;
216 im_port->shost->host_no, cmnd, hal_io->iotag);
233 im_port->shost->host_no, cmnd, hal_io->iotag);
294 struct bfad_im_port_s *im_port =
297 struct bfad_s *bfad = im_port->bfad;
371 struct bfad_im_port_s *im_port =
373 struct bfad_s *bfad = im_port->bfad;
381 itnim = bfad_get_itnim(im_port, starget->id);
467 itnim_drv->im_port = port->im_port;
474 port->im_port->shost->host_no,
496 itnim_drv->im_port = port->im_port;
521 itnim_drv->im_port = port->im_port;
534 bfad_im_scsi_host_alloc(struct bfad_s *bfad, struct bfad_im_port_s *im_port,
541 error = idr_alloc(&bfad_im_port_index, im_port, 0, 0, GFP_KERNEL);
547 im_port->idr_id = error;
550 im_port->shost = bfad_scsi_host_alloc(im_port, bfad);
551 if (!im_port->shost) {
556 im_portp = shost_priv(im_port->shost);
557 im_portp->p = im_port;
558 im_port->shost->unique_id = im_port->idr_id;
559 im_port->shost->this_id = -1;
560 im_port->shost->max_id = MAX_FCP_TARGET;
561 im_port->shost->max_lun = MAX_FCP_LUN;
562 im_port->shost->max_cmd_len = 16;
563 im_port->shost->can_queue = bfad->cfg_data.ioc_queue_depth;
564 if (im_port->port->pvb_type == BFAD_PORT_PHYS_BASE)
565 im_port->shost->transportt = bfad_im_scsi_transport_template;
567 im_port->shost->transportt =
570 error = scsi_add_host_with_dma(im_port->shost, dev, &bfad->pcidev->dev);
579 scsi_host_put(im_port->shost);
580 im_port->shost = NULL;
583 idr_remove(&bfad_im_port_index, im_port->idr_id);
590 bfad_im_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port)
594 im_port->shost->host_no);
596 fc_remove_host(im_port->shost);
598 scsi_remove_host(im_port->shost);
599 scsi_host_put(im_port->shost);
602 idr_remove(&bfad_im_port_index, im_port->idr_id);
609 struct bfad_im_port_s *im_port =
612 if (im_port->port->pvb_type != BFAD_PORT_PHYS_BASE) {
613 im_port->flags |= BFAD_PORT_DELETE;
614 fc_vport_terminate(im_port->fc_vport);
622 struct bfad_im_port_s *im_port;
624 im_port = kzalloc(sizeof(struct bfad_im_port_s), GFP_ATOMIC);
625 if (im_port == NULL) {
629 port->im_port = im_port;
630 im_port->port = port;
631 im_port->bfad = bfad;
633 INIT_WORK(&im_port->port_delete_work, bfad_im_port_delete_handler);
634 INIT_LIST_HEAD(&im_port->itnim_mapped_list);
635 INIT_LIST_HEAD(&im_port->binding_list);
644 struct bfad_im_port_s *im_port = port->im_port;
647 &im_port->port_delete_work);
651 bfad_im_port_clean(struct bfad_im_port_s *im_port)
655 struct bfad_s *bfad = im_port->bfad;
658 list_for_each_entry_safe(bp, bp_new, &im_port->binding_list,
665 WARN_ON(!list_empty(&im_port->itnim_mapped_list));
676 struct Scsi_Host *shost = bfad->pport.im_port->shost;
727 bfad_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad)
731 if (im_port->port->pvb_type == BFAD_PORT_PHYS_BASE)
745 bfad_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port)
747 if (!(im_port->flags & BFAD_PORT_DELETE))
749 bfad_im_scsi_host_free(im_port->bfad, im_port);
750 bfad_im_port_clean(im_port);
751 kfree(im_port);
905 bfad_get_itnim(struct bfad_im_port_s *im_port, int id)
910 list_for_each_entry(itnim, &im_port->itnim_mapped_list, list_entry) {
1025 bfad_fc_host_init(struct bfad_im_port_s *im_port)
1027 struct Scsi_Host *host = im_port->shost;
1028 struct bfad_s *bfad = im_port->bfad;
1029 struct bfad_port_s *port = im_port->port;
1058 bfad_im_fc_rport_add(struct bfad_im_port_s *im_port, struct bfad_itnim_s *itnim)
1073 fc_remote_port_add(im_port->shost, 0, &rport_ids);
1110 struct bfad_im_port_s *im_port;
1118 im_port = itnim->im_port;
1124 bfad_im_fc_rport_add(im_port, itnim);
1131 &im_port->itnim_mapped_list);
1135 im_port->shost->host_no,
1153 if (!(im_port->port->flags & BFAD_PORT_DELETE)) {
1168 im_port->shost->host_no,
1179 if (!(im_port->port->flags & BFAD_PORT_DELETE)) {
1205 struct bfad_im_port_s *im_port =
1207 struct bfad_s *bfad = im_port->bfad;