Lines Matching full:ri
426 struct mptfc_rport_info *ri; in mptfc_register_dev() local
440 list_for_each_entry(ri, &ioc->fc_rports, list) { in mptfc_register_dev()
441 pn = (u64)ri->pg0.WWPN.High << 32 | (u64)ri->pg0.WWPN.Low; in mptfc_register_dev()
443 list_move_tail(&ri->list, &ioc->fc_rports); in mptfc_register_dev()
449 ri = kzalloc(sizeof(struct mptfc_rport_info), GFP_KERNEL); in mptfc_register_dev()
450 if (!ri) in mptfc_register_dev()
452 list_add_tail(&ri->list, &ioc->fc_rports); in mptfc_register_dev()
455 ri->pg0 = *pg0; /* add/update pg0 data */ in mptfc_register_dev()
456 ri->flags &= ~MPT_RPORT_INFO_FLAGS_MISSING; in mptfc_register_dev()
459 if (!(ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED)) { in mptfc_register_dev()
460 ri->flags |= MPT_RPORT_INFO_FLAGS_REGISTERED; in mptfc_register_dev()
463 ri->rport = rport; in mptfc_register_dev()
471 if (ri->starget) { in mptfc_register_dev()
472 vtarget = ri->starget->hostdata; in mptfc_register_dev()
479 *((struct mptfc_rport_info **)rport->dd_data) = ri; in mptfc_register_dev()
483 pn = (u64)ri->pg0.WWPN.High << 32 | (u64)ri->pg0.WWPN.Low; in mptfc_register_dev()
484 nn = (u64)ri->pg0.WWNN.High << 32 | (u64)ri->pg0.WWNN.Low; in mptfc_register_dev()
494 ri->rport->scsi_target_id, in mptfc_register_dev()
495 ri->rport->dev_loss_tmo)); in mptfc_register_dev()
497 list_del(&ri->list); in mptfc_register_dev()
498 kfree(ri); in mptfc_register_dev()
499 ri = NULL; in mptfc_register_dev()
512 struct mptfc_rport_info *ri; in mptfc_target_destroy() local
516 ri = *((struct mptfc_rport_info **)rport->dd_data); in mptfc_target_destroy()
517 if (ri) /* better be! */ in mptfc_target_destroy()
518 ri->starget = NULL; in mptfc_target_destroy()
534 struct mptfc_rport_info *ri; in mptfc_target_alloc() local
545 ri = *((struct mptfc_rport_info **)rport->dd_data); in mptfc_target_alloc()
546 if (ri) { /* better be! */ in mptfc_target_alloc()
547 vtarget->id = ri->pg0.CurrentTargetID; in mptfc_target_alloc()
548 vtarget->channel = ri->pg0.CurrentBus; in mptfc_target_alloc()
549 ri->starget = starget; in mptfc_target_alloc()
572 struct mptfc_rport_info *ri; in mptfc_dump_lun_info() local
574 ri = *((struct mptfc_rport_info **)rport->dd_data); in mptfc_dump_lun_info()
575 pn = (u64)ri->pg0.WWPN.High << 32 | (u64)ri->pg0.WWPN.Low; in mptfc_dump_lun_info()
576 nn = (u64)ri->pg0.WWNN.High << 32 | (u64)ri->pg0.WWNN.Low; in mptfc_dump_lun_info()
583 sdev->id, ri->pg0.CurrentTargetID, in mptfc_dump_lun_info()
584 ri->pg0.PortIdentifier, in mptfc_dump_lun_info()
645 struct mptfc_rport_info *ri; in mptfc_qcmd() local
664 ri = *((struct mptfc_rport_info **)rport->dd_data); in mptfc_qcmd()
665 if (unlikely(!ri)) { in mptfc_qcmd()
1084 struct mptfc_rport_info *ri; in mptfc_setup_reset() local
1089 list_for_each_entry(ri, &ioc->fc_rports, list) { in mptfc_setup_reset()
1090 if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) { in mptfc_setup_reset()
1091 ri->flags &= ~MPT_RPORT_INFO_FLAGS_REGISTERED; in mptfc_setup_reset()
1092 fc_remote_port_delete(ri->rport); /* won't sleep */ in mptfc_setup_reset()
1093 ri->rport = NULL; in mptfc_setup_reset()
1094 starget = ri->starget; in mptfc_setup_reset()
1101 pn = (u64)ri->pg0.WWPN.High << 32 | in mptfc_setup_reset()
1102 (u64)ri->pg0.WWPN.Low; in mptfc_setup_reset()
1119 struct mptfc_rport_info *ri; in mptfc_rescan_devices() local
1124 list_for_each_entry(ri, &ioc->fc_rports, list) { in mptfc_rescan_devices()
1125 if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) { in mptfc_rescan_devices()
1126 ri->flags |= MPT_RPORT_INFO_FLAGS_MISSING; in mptfc_rescan_devices()
1141 list_for_each_entry(ri, &ioc->fc_rports, list) { in mptfc_rescan_devices()
1143 if (ri->flags & MPT_RPORT_INFO_FLAGS_MISSING) { in mptfc_rescan_devices()
1145 ri->flags &= ~(MPT_RPORT_INFO_FLAGS_REGISTERED| in mptfc_rescan_devices()
1147 fc_remote_port_delete(ri->rport); /* won't sleep */ in mptfc_rescan_devices()
1148 ri->rport = NULL; in mptfc_rescan_devices()
1149 starget = ri->starget; in mptfc_rescan_devices()
1156 pn = (u64)ri->pg0.WWPN.High << 32 | in mptfc_rescan_devices()
1157 (u64)ri->pg0.WWPN.Low; in mptfc_rescan_devices()