Lines Matching refs:rport

354 	struct fc_rport *rport = starget_to_rport(starget);  in fc_target_setup()  local
361 if (rport) { in fc_target_setup()
362 fc_starget_node_name(starget) = rport->node_name; in fc_target_setup()
363 fc_starget_port_name(starget) = rport->port_name; in fc_target_setup()
364 fc_starget_port_id(starget) = rport->port_id; in fc_target_setup()
704 struct fc_rport *rport = transport_class_to_rport(dev); \
705 struct Scsi_Host *shost = rport_to_shost(rport); \
708 !((rport->port_state == FC_PORTSTATE_BLOCKED) || \
709 (rport->port_state == FC_PORTSTATE_DELETED) || \
710 (rport->port_state == FC_PORTSTATE_NOTPRESENT))) \
711 i->f->get_rport_##field(rport); \
712 return snprintf(buf, sz, format_string, cast rport->field); \
722 struct fc_rport *rport = transport_class_to_rport(dev); \
723 struct Scsi_Host *shost = rport_to_shost(rport); \
726 if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \
727 (rport->port_state == FC_PORTSTATE_DELETED) || \
728 (rport->port_state == FC_PORTSTATE_NOTPRESENT)) \
733 i->f->set_rport_##field(rport, val); \
739 static FC_DEVICE_ATTR(rport, field, S_IRUGO, \
744 static FC_DEVICE_ATTR(rport, field, S_IRUGO, \
750 static FC_DEVICE_ATTR(rport, field, S_IRUGO | S_IWUSR, \
760 struct fc_rport *rport = transport_class_to_rport(dev); \
761 return snprintf(buf, sz, format_string, cast rport->field); \
766 static FC_DEVICE_ATTR(rport, field, S_IRUGO, \
771 static FC_DEVICE_ATTR(rport, field, S_IRUGO, \
780 struct fc_rport *rport = transport_class_to_rport(dev); \
782 name = get_fc_##title##_name(rport->title); \
787 static FC_DEVICE_ATTR(rport, title, S_IRUGO, \
834 struct fc_rport *rport = transport_class_to_rport(dev); in show_fc_rport_supported_classes() local
835 if (rport->supported_classes == FC_COS_UNSPECIFIED) in show_fc_rport_supported_classes()
837 return get_fc_cos_names(rport->supported_classes, buf); in show_fc_rport_supported_classes()
839 static FC_DEVICE_ATTR(rport, supported_classes, S_IRUGO,
863 static int fc_rport_set_dev_loss_tmo(struct fc_rport *rport, in fc_rport_set_dev_loss_tmo() argument
866 struct Scsi_Host *shost = rport_to_shost(rport); in fc_rport_set_dev_loss_tmo()
869 if ((rport->port_state == FC_PORTSTATE_BLOCKED) || in fc_rport_set_dev_loss_tmo()
870 (rport->port_state == FC_PORTSTATE_DELETED) || in fc_rport_set_dev_loss_tmo()
871 (rport->port_state == FC_PORTSTATE_NOTPRESENT)) in fc_rport_set_dev_loss_tmo()
883 if (rport->fast_io_fail_tmo == -1 && in fc_rport_set_dev_loss_tmo()
887 i->f->set_rport_dev_loss_tmo(rport, val); in fc_rport_set_dev_loss_tmo()
896 struct fc_rport *rport = transport_class_to_rport(dev); in store_fc_rport_dev_loss_tmo() local
904 rc = fc_rport_set_dev_loss_tmo(rport, val); in store_fc_rport_dev_loss_tmo()
909 static FC_DEVICE_ATTR(rport, dev_loss_tmo, S_IRUGO | S_IWUSR,
923 struct fc_rport *rport = transport_class_to_rport(dev); in show_fc_rport_roles() local
926 if ((rport->port_id != -1) && in show_fc_rport_roles()
927 (rport->port_id & FC_WELLKNOWN_PORTID_MASK) == in show_fc_rport_roles()
929 switch (rport->port_id & FC_WELLKNOWN_ROLE_MASK) { in show_fc_rport_roles()
944 if (rport->roles == FC_PORT_ROLE_UNKNOWN) in show_fc_rport_roles()
946 return get_fc_port_roles_names(rport->roles, buf); in show_fc_rport_roles()
949 static FC_DEVICE_ATTR(rport, roles, S_IRUGO,
962 struct fc_rport *rport = transport_class_to_rport(dev); in show_fc_rport_fast_io_fail_tmo() local
964 if (rport->fast_io_fail_tmo == -1) in show_fc_rport_fast_io_fail_tmo()
966 return snprintf(buf, 20, "%d\n", rport->fast_io_fail_tmo); in show_fc_rport_fast_io_fail_tmo()
976 struct fc_rport *rport = transport_class_to_rport(dev); in store_fc_rport_fast_io_fail_tmo() local
978 if ((rport->port_state == FC_PORTSTATE_BLOCKED) || in store_fc_rport_fast_io_fail_tmo()
979 (rport->port_state == FC_PORTSTATE_DELETED) || in store_fc_rport_fast_io_fail_tmo()
980 (rport->port_state == FC_PORTSTATE_NOTPRESENT)) in store_fc_rport_fast_io_fail_tmo()
983 rport->fast_io_fail_tmo = -1; in store_fc_rport_fast_io_fail_tmo()
992 if ((val >= rport->dev_loss_tmo) || in store_fc_rport_fast_io_fail_tmo()
996 rport->fast_io_fail_tmo = val; in store_fc_rport_fast_io_fail_tmo()
1000 static FC_DEVICE_ATTR(rport, fast_io_fail_tmo, S_IRUGO | S_IWUSR,
1022 struct fc_rport *rport = starget_to_rport(starget); \
1023 if (rport) \
1024 fc_starget_##field(starget) = rport->field; \
1611 struct fc_rport *rport; in store_fc_private_host_tgtid_bind_type() local
1622 get_list_head_entry(rport, in store_fc_private_host_tgtid_bind_type()
1624 list_del(&rport->peers); in store_fc_private_host_tgtid_bind_type()
1625 rport->port_state = FC_PORTSTATE_DELETED; in store_fc_private_host_tgtid_bind_type()
1626 fc_queue_work(shost, &rport->rport_delete_work); in store_fc_private_host_tgtid_bind_type()
1666 struct fc_rport *rport; in store_fc_private_host_dev_loss_tmo() local
1676 list_for_each_entry(rport, &fc_host->rports, peers) in store_fc_private_host_dev_loss_tmo()
1677 fc_rport_set_dev_loss_tmo(rport, val); in store_fc_private_host_dev_loss_tmo()
1974 struct fc_rport *rport = dev_to_rport(dev); in fc_rport_dev_release() local
1976 kfree(rport); in fc_rport_dev_release()
2064 struct fc_rport *rport = starget_to_rport(scsi_target(scmd->device)); in fc_timed_out() local
2066 if (rport->port_state == FC_PORTSTATE_BLOCKED) in fc_timed_out()
2080 struct fc_rport *rport; in fc_user_scan_tgt() local
2085 list_for_each_entry(rport, &fc_host_rports(shost), peers) { in fc_user_scan_tgt()
2086 if (rport->scsi_target_id == -1) in fc_user_scan_tgt()
2089 if (rport->port_state != FC_PORTSTATE_ONLINE) in fc_user_scan_tgt()
2092 if ((channel == rport->channel) && in fc_user_scan_tgt()
2093 (id == rport->scsi_target_id)) { in fc_user_scan_tgt()
2095 scsi_scan_target(&rport->dev, channel, id, lun, 1); in fc_user_scan_tgt()
2423 struct fc_rport *rport = NULL, *next_rport = NULL; in fc_remove_host() local
2435 list_for_each_entry_safe(rport, next_rport, in fc_remove_host()
2437 list_del(&rport->peers); in fc_remove_host()
2438 rport->port_state = FC_PORTSTATE_DELETED; in fc_remove_host()
2439 fc_queue_work(shost, &rport->rport_delete_work); in fc_remove_host()
2442 list_for_each_entry_safe(rport, next_rport, in fc_remove_host()
2444 list_del(&rport->peers); in fc_remove_host()
2445 rport->port_state = FC_PORTSTATE_DELETED; in fc_remove_host()
2446 fc_queue_work(shost, &rport->rport_delete_work); in fc_remove_host()
2470 static void fc_terminate_rport_io(struct fc_rport *rport) in fc_terminate_rport_io() argument
2472 struct Scsi_Host *shost = rport_to_shost(rport); in fc_terminate_rport_io()
2477 i->f->terminate_rport_io(rport); in fc_terminate_rport_io()
2484 scsi_target_unblock(&rport->dev); in fc_terminate_rport_io()
2496 struct fc_rport *rport = in fc_starget_delete() local
2499 fc_terminate_rport_io(rport); in fc_starget_delete()
2500 scsi_remove_target(&rport->dev); in fc_starget_delete()
2511 struct fc_rport *rport = in fc_rport_final_delete() local
2513 struct device *dev = &rport->dev; in fc_rport_final_delete()
2514 struct Scsi_Host *shost = rport_to_shost(rport); in fc_rport_final_delete()
2519 fc_terminate_rport_io(rport); in fc_rport_final_delete()
2525 if (rport->flags & FC_RPORT_SCAN_PENDING) in fc_rport_final_delete()
2534 if (rport->flags & FC_RPORT_DEVLOSS_PENDING) { in fc_rport_final_delete()
2536 if (!cancel_delayed_work(&rport->fail_io_work)) in fc_rport_final_delete()
2538 if (!cancel_delayed_work(&rport->dev_loss_work)) in fc_rport_final_delete()
2541 rport->flags &= ~FC_RPORT_DEVLOSS_PENDING; in fc_rport_final_delete()
2546 if (rport->scsi_target_id != -1) in fc_rport_final_delete()
2547 fc_starget_delete(&rport->stgt_delete_work); in fc_rport_final_delete()
2557 if (!(rport->flags & FC_RPORT_DEVLOSS_CALLBK_DONE) && in fc_rport_final_delete()
2559 rport->flags |= FC_RPORT_DEVLOSS_CALLBK_DONE; in fc_rport_final_delete()
2565 i->f->dev_loss_tmo_callbk(rport); in fc_rport_final_delete()
2567 fc_bsg_remove(rport->rqst_q); in fc_rport_final_delete()
2596 struct fc_rport *rport; in fc_rport_create() local
2603 rport = kzalloc(size, GFP_KERNEL); in fc_rport_create()
2604 if (unlikely(!rport)) { in fc_rport_create()
2609 rport->maxframe_size = -1; in fc_rport_create()
2610 rport->supported_classes = FC_COS_UNSPECIFIED; in fc_rport_create()
2611 rport->dev_loss_tmo = fc_host->dev_loss_tmo; in fc_rport_create()
2612 memcpy(&rport->node_name, &ids->node_name, sizeof(rport->node_name)); in fc_rport_create()
2613 memcpy(&rport->port_name, &ids->port_name, sizeof(rport->port_name)); in fc_rport_create()
2614 rport->port_id = ids->port_id; in fc_rport_create()
2615 rport->roles = ids->roles; in fc_rport_create()
2616 rport->port_state = FC_PORTSTATE_ONLINE; in fc_rport_create()
2618 rport->dd_data = &rport[1]; in fc_rport_create()
2619 rport->channel = channel; in fc_rport_create()
2620 rport->fast_io_fail_tmo = -1; in fc_rport_create()
2622 INIT_DELAYED_WORK(&rport->dev_loss_work, fc_timeout_deleted_rport); in fc_rport_create()
2623 INIT_DELAYED_WORK(&rport->fail_io_work, fc_timeout_fail_rport_io); in fc_rport_create()
2624 INIT_WORK(&rport->scan_work, fc_scsi_scan_rport); in fc_rport_create()
2625 INIT_WORK(&rport->stgt_delete_work, fc_starget_delete); in fc_rport_create()
2626 INIT_WORK(&rport->rport_delete_work, fc_rport_final_delete); in fc_rport_create()
2630 rport->number = fc_host->next_rport_number++; in fc_rport_create()
2631 if (rport->roles & FC_PORT_ROLE_FCP_TARGET) in fc_rport_create()
2632 rport->scsi_target_id = fc_host->next_target_id++; in fc_rport_create()
2634 rport->scsi_target_id = -1; in fc_rport_create()
2635 list_add_tail(&rport->peers, &fc_host->rports); in fc_rport_create()
2640 dev = &rport->dev; in fc_rport_create()
2645 shost->host_no, channel, rport->number); in fc_rport_create()
2656 fc_bsg_rportadd(shost, rport); in fc_rport_create()
2659 if (rport->roles & FC_PORT_ROLE_FCP_TARGET) { in fc_rport_create()
2661 rport->flags |= FC_RPORT_SCAN_PENDING; in fc_rport_create()
2662 scsi_queue_work(shost, &rport->scan_work); in fc_rport_create()
2665 return rport; in fc_rport_create()
2670 list_del(&rport->peers); in fc_rport_create()
2674 kfree(rport); in fc_rport_create()
2722 struct fc_rport *rport; in fc_remote_port_add() local
2736 list_for_each_entry(rport, &fc_host->rports, peers) { in fc_remote_port_add()
2738 if ((rport->port_state == FC_PORTSTATE_BLOCKED) && in fc_remote_port_add()
2739 (rport->channel == channel)) { in fc_remote_port_add()
2744 if (rport->port_name == ids->port_name) in fc_remote_port_add()
2748 if (rport->node_name == ids->node_name) in fc_remote_port_add()
2752 if (rport->port_id == ids->port_id) in fc_remote_port_add()
2759 memcpy(&rport->node_name, &ids->node_name, in fc_remote_port_add()
2760 sizeof(rport->node_name)); in fc_remote_port_add()
2761 memcpy(&rport->port_name, &ids->port_name, in fc_remote_port_add()
2762 sizeof(rport->port_name)); in fc_remote_port_add()
2763 rport->port_id = ids->port_id; in fc_remote_port_add()
2765 rport->port_state = FC_PORTSTATE_ONLINE; in fc_remote_port_add()
2766 rport->roles = ids->roles; in fc_remote_port_add()
2771 memset(rport->dd_data, 0, in fc_remote_port_add()
2791 if ((rport->scsi_target_id != -1) && in fc_remote_port_add()
2793 return rport; in fc_remote_port_add()
2800 if (!cancel_delayed_work(&rport->fail_io_work)) in fc_remote_port_add()
2802 if (!cancel_delayed_work(&rport->dev_loss_work)) in fc_remote_port_add()
2807 rport->flags &= ~(FC_RPORT_FAST_FAIL_TIMEDOUT | in fc_remote_port_add()
2812 if (rport->scsi_target_id != -1) { in fc_remote_port_add()
2813 rport->flags |= FC_RPORT_SCAN_PENDING; in fc_remote_port_add()
2815 &rport->scan_work); in fc_remote_port_add()
2818 scsi_target_unblock(&rport->dev); in fc_remote_port_add()
2823 fc_bsg_goose_queue(rport); in fc_remote_port_add()
2825 return rport; in fc_remote_port_add()
2838 list_for_each_entry(rport, &fc_host->rport_bindings, in fc_remote_port_add()
2840 if (rport->channel != channel) in fc_remote_port_add()
2845 if (rport->port_name == ids->port_name) in fc_remote_port_add()
2849 if (rport->node_name == ids->node_name) in fc_remote_port_add()
2853 if (rport->port_id == ids->port_id) in fc_remote_port_add()
2861 list_move_tail(&rport->peers, &fc_host->rports); in fc_remote_port_add()
2867 memcpy(&rport->node_name, &ids->node_name, in fc_remote_port_add()
2868 sizeof(rport->node_name)); in fc_remote_port_add()
2869 memcpy(&rport->port_name, &ids->port_name, in fc_remote_port_add()
2870 sizeof(rport->port_name)); in fc_remote_port_add()
2871 rport->port_id = ids->port_id; in fc_remote_port_add()
2872 rport->roles = ids->roles; in fc_remote_port_add()
2873 rport->port_state = FC_PORTSTATE_ONLINE; in fc_remote_port_add()
2874 rport->flags &= ~FC_RPORT_FAST_FAIL_TIMEDOUT; in fc_remote_port_add()
2877 memset(rport->dd_data, 0, in fc_remote_port_add()
2880 if (rport->roles & FC_PORT_ROLE_FCP_TARGET) { in fc_remote_port_add()
2882 rport->flags |= FC_RPORT_SCAN_PENDING; in fc_remote_port_add()
2883 scsi_queue_work(shost, &rport->scan_work); in fc_remote_port_add()
2885 scsi_target_unblock(&rport->dev); in fc_remote_port_add()
2889 return rport; in fc_remote_port_add()
2896 rport = fc_rport_create(shost, channel, ids); in fc_remote_port_add()
2898 return rport; in fc_remote_port_add()
2954 fc_remote_port_delete(struct fc_rport *rport) in fc_remote_port_delete() argument
2956 struct Scsi_Host *shost = rport_to_shost(rport); in fc_remote_port_delete()
2957 unsigned long timeout = rport->dev_loss_tmo; in fc_remote_port_delete()
2970 if (rport->port_state != FC_PORTSTATE_ONLINE) { in fc_remote_port_delete()
2988 rport->port_state = FC_PORTSTATE_BLOCKED; in fc_remote_port_delete()
2990 rport->flags |= FC_RPORT_DEVLOSS_PENDING; in fc_remote_port_delete()
2994 if (rport->roles & FC_PORT_ROLE_FCP_INITIATOR && in fc_remote_port_delete()
2996 fc_tgt_it_nexus_destroy(shost, (unsigned long)rport); in fc_remote_port_delete()
2998 scsi_target_block(&rport->dev); in fc_remote_port_delete()
3001 if ((rport->fast_io_fail_tmo != -1) && in fc_remote_port_delete()
3002 (rport->fast_io_fail_tmo < timeout)) in fc_remote_port_delete()
3003 fc_queue_devloss_work(shost, &rport->fail_io_work, in fc_remote_port_delete()
3004 rport->fast_io_fail_tmo * HZ); in fc_remote_port_delete()
3007 fc_queue_devloss_work(shost, &rport->dev_loss_work, timeout * HZ); in fc_remote_port_delete()
3032 fc_remote_port_rolechg(struct fc_rport *rport, u32 roles) in fc_remote_port_rolechg() argument
3034 struct Scsi_Host *shost = rport_to_shost(rport); in fc_remote_port_rolechg()
3042 if (rport->scsi_target_id == -1) { in fc_remote_port_rolechg()
3043 rport->scsi_target_id = fc_host->next_target_id++; in fc_remote_port_rolechg()
3045 } else if (!(rport->roles & FC_PORT_ROLE_FCP_TARGET)) in fc_remote_port_rolechg()
3048 ret = fc_tgt_it_nexus_create(shost, (unsigned long)rport, in fc_remote_port_rolechg()
3049 (char *)&rport->node_name); in fc_remote_port_rolechg()
3055 rport->roles = roles; in fc_remote_port_rolechg()
3072 if (!cancel_delayed_work(&rport->fail_io_work)) in fc_remote_port_rolechg()
3074 if (!cancel_delayed_work(&rport->dev_loss_work)) in fc_remote_port_rolechg()
3078 rport->flags &= ~(FC_RPORT_FAST_FAIL_TIMEDOUT | in fc_remote_port_rolechg()
3088 rport->flags |= FC_RPORT_SCAN_PENDING; in fc_remote_port_rolechg()
3089 scsi_queue_work(shost, &rport->scan_work); in fc_remote_port_rolechg()
3091 scsi_target_unblock(&rport->dev); in fc_remote_port_rolechg()
3106 struct fc_rport *rport = in fc_timeout_deleted_rport() local
3108 struct Scsi_Host *shost = rport_to_shost(rport); in fc_timeout_deleted_rport()
3116 rport->flags &= ~FC_RPORT_DEVLOSS_PENDING; in fc_timeout_deleted_rport()
3123 if ((rport->port_state == FC_PORTSTATE_ONLINE) && in fc_timeout_deleted_rport()
3124 (rport->scsi_target_id != -1) && in fc_timeout_deleted_rport()
3125 !(rport->roles & FC_PORT_ROLE_FCP_TARGET)) { in fc_timeout_deleted_rport()
3126 dev_printk(KERN_ERR, &rport->dev, in fc_timeout_deleted_rport()
3130 scsi_target_unblock(&rport->dev); in fc_timeout_deleted_rport()
3131 fc_queue_work(shost, &rport->stgt_delete_work); in fc_timeout_deleted_rport()
3136 if (rport->port_state != FC_PORTSTATE_BLOCKED) { in fc_timeout_deleted_rport()
3138 dev_printk(KERN_ERR, &rport->dev, in fc_timeout_deleted_rport()
3141 (rport->scsi_target_id != -1) ? " and starget" : ""); in fc_timeout_deleted_rport()
3146 (rport->scsi_target_id == -1)) { in fc_timeout_deleted_rport()
3147 list_del(&rport->peers); in fc_timeout_deleted_rport()
3148 rport->port_state = FC_PORTSTATE_DELETED; in fc_timeout_deleted_rport()
3149 dev_printk(KERN_ERR, &rport->dev, in fc_timeout_deleted_rport()
3152 (rport->scsi_target_id != -1) ? " and starget" : ""); in fc_timeout_deleted_rport()
3153 fc_queue_work(shost, &rport->rport_delete_work); in fc_timeout_deleted_rport()
3158 dev_printk(KERN_ERR, &rport->dev, in fc_timeout_deleted_rport()
3162 list_move_tail(&rport->peers, &fc_host->rport_bindings); in fc_timeout_deleted_rport()
3173 rport->maxframe_size = -1; in fc_timeout_deleted_rport()
3174 rport->supported_classes = FC_COS_UNSPECIFIED; in fc_timeout_deleted_rport()
3175 rport->roles = FC_PORT_ROLE_UNKNOWN; in fc_timeout_deleted_rport()
3176 rport->port_state = FC_PORTSTATE_NOTPRESENT; in fc_timeout_deleted_rport()
3177 rport->flags &= ~FC_RPORT_FAST_FAIL_TIMEDOUT; in fc_timeout_deleted_rport()
3185 fc_terminate_rport_io(rport); in fc_timeout_deleted_rport()
3189 if (rport->port_state == FC_PORTSTATE_NOTPRESENT) { /* still missing */ in fc_timeout_deleted_rport()
3194 rport->node_name = -1; in fc_timeout_deleted_rport()
3195 rport->port_id = -1; in fc_timeout_deleted_rport()
3198 rport->port_name = -1; in fc_timeout_deleted_rport()
3199 rport->port_id = -1; in fc_timeout_deleted_rport()
3202 rport->node_name = -1; in fc_timeout_deleted_rport()
3203 rport->port_name = -1; in fc_timeout_deleted_rport()
3214 rport->flags |= FC_RPORT_DEVLOSS_CALLBK_DONE; in fc_timeout_deleted_rport()
3215 fc_queue_work(shost, &rport->stgt_delete_work); in fc_timeout_deleted_rport()
3229 i->f->dev_loss_tmo_callbk(rport); in fc_timeout_deleted_rport()
3243 struct fc_rport *rport = in fc_timeout_fail_rport_io() local
3246 if (rport->port_state != FC_PORTSTATE_BLOCKED) in fc_timeout_fail_rport_io()
3249 rport->flags |= FC_RPORT_FAST_FAIL_TIMEDOUT; in fc_timeout_fail_rport_io()
3250 fc_terminate_rport_io(rport); in fc_timeout_fail_rport_io()
3260 struct fc_rport *rport = in fc_scsi_scan_rport() local
3262 struct Scsi_Host *shost = rport_to_shost(rport); in fc_scsi_scan_rport()
3266 if ((rport->port_state == FC_PORTSTATE_ONLINE) && in fc_scsi_scan_rport()
3267 (rport->roles & FC_PORT_ROLE_FCP_TARGET) && in fc_scsi_scan_rport()
3269 scsi_scan_target(&rport->dev, rport->channel, in fc_scsi_scan_rport()
3270 rport->scsi_target_id, SCAN_WILD_CARD, 1); in fc_scsi_scan_rport()
3274 rport->flags &= ~FC_RPORT_SCAN_PENDING; in fc_scsi_scan_rport()
3295 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); in fc_block_scsi_eh() local
3299 while (rport->port_state == FC_PORTSTATE_BLOCKED && in fc_block_scsi_eh()
3300 !(rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT)) { in fc_block_scsi_eh()
3307 if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT) in fc_block_scsi_eh()
3634 if (job->rport && job->rport->port_state == FC_PORTSTATE_BLOCKED) in fc_bsg_job_timeout()
3687 fc_req_to_bsgjob(struct Scsi_Host *shost, struct fc_rport *rport, in fc_req_to_bsgjob() argument
3713 job->rport = rport; in fc_req_to_bsgjob()
3734 if (rport) in fc_req_to_bsgjob()
3735 job->dev = &rport->dev; in fc_req_to_bsgjob()
3845 fc_bsg_goose_queue(struct fc_rport *rport) in fc_bsg_goose_queue() argument
3847 if (!rport->rqst_q) in fc_bsg_goose_queue()
3853 get_device(&rport->dev); in fc_bsg_goose_queue()
3854 blk_run_queue_async(rport->rqst_q); in fc_bsg_goose_queue()
3855 put_device(&rport->dev); in fc_bsg_goose_queue()
3867 struct fc_rport *rport, struct fc_bsg_job *job) in fc_bsg_rport_dispatch() argument
3924 struct fc_rport *rport, struct device *dev) in fc_bsg_request_handler() argument
3934 if (rport && (rport->port_state == FC_PORTSTATE_BLOCKED) && in fc_bsg_request_handler()
3935 !(rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT)) in fc_bsg_request_handler()
3942 if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) { in fc_bsg_request_handler()
3952 ret = fc_req_to_bsgjob(shost, rport, req); in fc_bsg_request_handler()
3974 if (rport) in fc_bsg_request_handler()
3975 ret = fc_bsg_rport_dispatch(q, shost, rport, job); in fc_bsg_request_handler()
4014 struct fc_rport *rport = q->queuedata; in fc_bsg_rport_handler() local
4015 struct Scsi_Host *shost = rport_to_shost(rport); in fc_bsg_rport_handler()
4017 fc_bsg_request_handler(q, shost, rport, &rport->dev); in fc_bsg_rport_handler()
4077 fc_bsg_rportadd(struct Scsi_Host *shost, struct fc_rport *rport) in fc_bsg_rportadd() argument
4079 struct device *dev = &rport->dev; in fc_bsg_rportadd()
4084 rport->rqst_q = NULL; in fc_bsg_rportadd()
4097 q->queuedata = rport; in fc_bsg_rportadd()
4112 rport->rqst_q = q; in fc_bsg_rportadd()