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()
372 struct bfad_im_port_s *im_port = in bfad_im_reset_target_handler() local
374 struct bfad_s *bfad = im_port->bfad; in bfad_im_reset_target_handler()
382 itnim = bfad_get_itnim(im_port, starget->id); in bfad_im_reset_target_handler()
468 itnim_drv->im_port = port->im_port; in bfa_fcb_itnim_free()
475 port->im_port->shost->host_no, in bfa_fcb_itnim_free()
497 itnim_drv->im_port = port->im_port; in bfa_fcb_itnim_online()
522 itnim_drv->im_port = port->im_port; in bfa_fcb_itnim_offline()
535 bfad_im_scsi_host_alloc(struct bfad_s *bfad, struct bfad_im_port_s *im_port, in bfad_im_scsi_host_alloc() argument
542 error = idr_alloc(&bfad_im_port_index, im_port, 0, 0, GFP_KERNEL); in bfad_im_scsi_host_alloc()
548 im_port->idr_id = error; in bfad_im_scsi_host_alloc()
551 im_port->shost = bfad_scsi_host_alloc(im_port, bfad); in bfad_im_scsi_host_alloc()
552 if (!im_port->shost) { in bfad_im_scsi_host_alloc()
557 im_portp = shost_priv(im_port->shost); in bfad_im_scsi_host_alloc()
558 im_portp->p = im_port; in bfad_im_scsi_host_alloc()
559 im_port->shost->unique_id = im_port->idr_id; in bfad_im_scsi_host_alloc()
560 im_port->shost->this_id = -1; in bfad_im_scsi_host_alloc()
561 im_port->shost->max_id = MAX_FCP_TARGET; in bfad_im_scsi_host_alloc()
562 im_port->shost->max_lun = MAX_FCP_LUN; in bfad_im_scsi_host_alloc()
563 im_port->shost->max_cmd_len = 16; in bfad_im_scsi_host_alloc()
564 im_port->shost->can_queue = bfad->cfg_data.ioc_queue_depth; in bfad_im_scsi_host_alloc()
565 if (im_port->port->pvb_type == BFAD_PORT_PHYS_BASE) in bfad_im_scsi_host_alloc()
566 im_port->shost->transportt = bfad_im_scsi_transport_template; in bfad_im_scsi_host_alloc()
568 im_port->shost->transportt = in bfad_im_scsi_host_alloc()
571 error = scsi_add_host_with_dma(im_port->shost, dev, &bfad->pcidev->dev); in bfad_im_scsi_host_alloc()
580 scsi_host_put(im_port->shost); in bfad_im_scsi_host_alloc()
581 im_port->shost = NULL; in bfad_im_scsi_host_alloc()
584 idr_remove(&bfad_im_port_index, im_port->idr_id); in bfad_im_scsi_host_alloc()
591 bfad_im_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port) in bfad_im_scsi_host_free() argument
595 im_port->shost->host_no); in bfad_im_scsi_host_free()
597 fc_remove_host(im_port->shost); in bfad_im_scsi_host_free()
599 scsi_remove_host(im_port->shost); in bfad_im_scsi_host_free()
600 scsi_host_put(im_port->shost); in bfad_im_scsi_host_free()
603 idr_remove(&bfad_im_port_index, im_port->idr_id); in bfad_im_scsi_host_free()
610 struct bfad_im_port_s *im_port = in bfad_im_port_delete_handler() local
613 if (im_port->port->pvb_type != BFAD_PORT_PHYS_BASE) { in bfad_im_port_delete_handler()
614 im_port->flags |= BFAD_PORT_DELETE; in bfad_im_port_delete_handler()
615 fc_vport_terminate(im_port->fc_vport); in bfad_im_port_delete_handler()
623 struct bfad_im_port_s *im_port; in bfad_im_port_new() local
625 im_port = kzalloc(sizeof(struct bfad_im_port_s), GFP_ATOMIC); in bfad_im_port_new()
626 if (im_port == NULL) { in bfad_im_port_new()
630 port->im_port = im_port; in bfad_im_port_new()
631 im_port->port = port; in bfad_im_port_new()
632 im_port->bfad = bfad; in bfad_im_port_new()
634 INIT_WORK(&im_port->port_delete_work, bfad_im_port_delete_handler); in bfad_im_port_new()
635 INIT_LIST_HEAD(&im_port->itnim_mapped_list); in bfad_im_port_new()
636 INIT_LIST_HEAD(&im_port->binding_list); in bfad_im_port_new()
645 struct bfad_im_port_s *im_port = port->im_port; in bfad_im_port_delete() local
648 &im_port->port_delete_work); in bfad_im_port_delete()
652 bfad_im_port_clean(struct bfad_im_port_s *im_port) in bfad_im_port_clean() argument
656 struct bfad_s *bfad = im_port->bfad; in bfad_im_port_clean()
659 list_for_each_entry_safe(bp, bp_new, &im_port->binding_list, in bfad_im_port_clean()
666 WARN_ON(!list_empty(&im_port->itnim_mapped_list)); in bfad_im_port_clean()
677 struct Scsi_Host *shost = bfad->pport.im_port->shost; in bfad_aen_im_notify_handler()
728 bfad_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad) in bfad_scsi_host_alloc() argument
732 if (im_port->port->pvb_type == BFAD_PORT_PHYS_BASE) in bfad_scsi_host_alloc()
746 bfad_scsi_host_free(struct bfad_s *bfad, struct bfad_im_port_s *im_port) in bfad_scsi_host_free() argument
748 if (!(im_port->flags & BFAD_PORT_DELETE)) in bfad_scsi_host_free()
750 bfad_im_scsi_host_free(im_port->bfad, im_port); in bfad_scsi_host_free()
751 bfad_im_port_clean(im_port); in bfad_scsi_host_free()
752 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()