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