Lines Matching full:ri

268 	struct mptfc_rport_info *ri;  in mptfc_bus_reset()  local
271 list_for_each_entry(ri, &hd->ioc->fc_rports, list) { in mptfc_bus_reset()
272 if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) { in mptfc_bus_reset()
273 VirtTarget *vtarget = ri->starget->hostdata; in mptfc_bus_reset()
277 rtn = fc_block_rport(ri->rport); in mptfc_bus_reset()
463 struct mptfc_rport_info *ri; in mptfc_register_dev() local
477 list_for_each_entry(ri, &ioc->fc_rports, list) { in mptfc_register_dev()
478 pn = (u64)ri->pg0.WWPN.High << 32 | (u64)ri->pg0.WWPN.Low; in mptfc_register_dev()
480 list_move_tail(&ri->list, &ioc->fc_rports); in mptfc_register_dev()
486 ri = kzalloc(sizeof(struct mptfc_rport_info), GFP_KERNEL); in mptfc_register_dev()
487 if (!ri) in mptfc_register_dev()
489 list_add_tail(&ri->list, &ioc->fc_rports); in mptfc_register_dev()
492 ri->pg0 = *pg0; /* add/update pg0 data */ in mptfc_register_dev()
493 ri->flags &= ~MPT_RPORT_INFO_FLAGS_MISSING; in mptfc_register_dev()
496 if (!(ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED)) { in mptfc_register_dev()
497 ri->flags |= MPT_RPORT_INFO_FLAGS_REGISTERED; in mptfc_register_dev()
500 ri->rport = rport; in mptfc_register_dev()
508 if (ri->starget) { in mptfc_register_dev()
509 vtarget = ri->starget->hostdata; in mptfc_register_dev()
516 *((struct mptfc_rport_info **)rport->dd_data) = ri; in mptfc_register_dev()
520 pn = (u64)ri->pg0.WWPN.High << 32 | (u64)ri->pg0.WWPN.Low; in mptfc_register_dev()
521 nn = (u64)ri->pg0.WWNN.High << 32 | (u64)ri->pg0.WWNN.Low; in mptfc_register_dev()
531 ri->rport->scsi_target_id, in mptfc_register_dev()
532 ri->rport->dev_loss_tmo)); in mptfc_register_dev()
534 list_del(&ri->list); in mptfc_register_dev()
535 kfree(ri); in mptfc_register_dev()
536 ri = NULL; in mptfc_register_dev()
549 struct mptfc_rport_info *ri; in mptfc_target_destroy() local
553 ri = *((struct mptfc_rport_info **)rport->dd_data); in mptfc_target_destroy()
554 if (ri) /* better be! */ in mptfc_target_destroy()
555 ri->starget = NULL; in mptfc_target_destroy()
571 struct mptfc_rport_info *ri; in mptfc_target_alloc() local
582 ri = *((struct mptfc_rport_info **)rport->dd_data); in mptfc_target_alloc()
583 if (ri) { /* better be! */ in mptfc_target_alloc()
584 vtarget->id = ri->pg0.CurrentTargetID; in mptfc_target_alloc()
585 vtarget->channel = ri->pg0.CurrentBus; in mptfc_target_alloc()
586 ri->starget = starget; in mptfc_target_alloc()
609 struct mptfc_rport_info *ri; in mptfc_dump_lun_info() local
611 ri = *((struct mptfc_rport_info **)rport->dd_data); in mptfc_dump_lun_info()
612 pn = (u64)ri->pg0.WWPN.High << 32 | (u64)ri->pg0.WWPN.Low; in mptfc_dump_lun_info()
613 nn = (u64)ri->pg0.WWNN.High << 32 | (u64)ri->pg0.WWNN.Low; in mptfc_dump_lun_info()
620 sdev->id, ri->pg0.CurrentTargetID, in mptfc_dump_lun_info()
621 ri->pg0.PortIdentifier, in mptfc_dump_lun_info()
682 struct mptfc_rport_info *ri; in mptfc_qcmd() local
701 ri = *((struct mptfc_rport_info **)rport->dd_data); in mptfc_qcmd()
702 if (unlikely(!ri)) { in mptfc_qcmd()
1121 struct mptfc_rport_info *ri; in mptfc_setup_reset() local
1126 list_for_each_entry(ri, &ioc->fc_rports, list) { in mptfc_setup_reset()
1127 if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) { in mptfc_setup_reset()
1128 ri->flags &= ~MPT_RPORT_INFO_FLAGS_REGISTERED; in mptfc_setup_reset()
1129 fc_remote_port_delete(ri->rport); /* won't sleep */ in mptfc_setup_reset()
1130 ri->rport = NULL; in mptfc_setup_reset()
1131 starget = ri->starget; in mptfc_setup_reset()
1138 pn = (u64)ri->pg0.WWPN.High << 32 | in mptfc_setup_reset()
1139 (u64)ri->pg0.WWPN.Low; in mptfc_setup_reset()
1156 struct mptfc_rport_info *ri; in mptfc_rescan_devices() local
1161 list_for_each_entry(ri, &ioc->fc_rports, list) { in mptfc_rescan_devices()
1162 if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) { in mptfc_rescan_devices()
1163 ri->flags |= MPT_RPORT_INFO_FLAGS_MISSING; in mptfc_rescan_devices()
1178 list_for_each_entry(ri, &ioc->fc_rports, list) { in mptfc_rescan_devices()
1180 if (ri->flags & MPT_RPORT_INFO_FLAGS_MISSING) { in mptfc_rescan_devices()
1182 ri->flags &= ~(MPT_RPORT_INFO_FLAGS_REGISTERED| in mptfc_rescan_devices()
1184 fc_remote_port_delete(ri->rport); /* won't sleep */ in mptfc_rescan_devices()
1185 ri->rport = NULL; in mptfc_rescan_devices()
1186 starget = ri->starget; in mptfc_rescan_devices()
1193 pn = (u64)ri->pg0.WWPN.High << 32 | in mptfc_rescan_devices()
1194 (u64)ri->pg0.WWPN.Low; in mptfc_rescan_devices()