Lines Matching defs:rport
1332 * ibmvfc_set_rport_dev_loss_tmo - Set rport's device loss timeout
1333 * @rport: rport struct
1339 static void ibmvfc_set_rport_dev_loss_tmo(struct fc_rport *rport, u32 timeout)
1342 rport->dev_loss_tmo = timeout;
1344 rport->dev_loss_tmo = 1;
1798 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
1804 if (rport == tgt->rport) {
1898 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
1908 vfc_cmd->target_wwpn = cpu_to_be64(rport->port_name);
1917 vfc_cmd->tgt_scsi_id = cpu_to_be64(rport->port_id);
1934 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
1943 if (unlikely((rc = fc_remote_port_chkready(rport))) ||
2156 struct fc_rport *rport = fc_bsg_to_rport(job);
2169 if (rport)
2170 port_id = rport->port_id;
2228 if (unlikely(rc || (rport && (rc = fc_remote_port_chkready(rport)))) ||
2311 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
2339 tmf->target_wwpn = cpu_to_be64(rport->port_name);
2382 * @rport: device to match
2385 * 1 if event matches rport / 0 if event does not match rport
2387 static int ibmvfc_match_rport(struct ibmvfc_event *evt, void *rport)
2393 if (cmd_rport == rport)
2531 struct fc_rport *rport = starget_to_rport(starget);
2544 tmf->target_wwpn = cpu_to_be64(rport->port_name);
2550 tmf->scsi_id = cpu_to_be64(rport->port_id);
2782 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
2821 tmf->target_wwpn = cpu_to_be64(rport->port_name);
3037 * ibmvfc_terminate_rport_io - Terminate all pending I/O to the rport.
3038 * @rport: rport struct
3043 static void ibmvfc_terminate_rport_io(struct fc_rport *rport)
3045 struct Scsi_Host *shost = rport_to_shost(rport);
3056 if (dev_rport != rport)
3061 rc = ibmvfc_wait_for_ops(vhost, rport, ibmvfc_match_rport);
3069 if (tgt->scsi_id == rport->port_id) {
3372 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
3376 if (!rport || fc_remote_port_chkready(rport))
4849 * deleted the rport from the FC transport so we do a move
4852 * we only do this if fast fail is disabled for the rport,
4872 wtgt->action, wtgt->rport);
5472 struct fc_rport *rport;
5475 tgt_dbg(tgt, "Adding rport\n");
5476 rport = fc_remote_port_add(vhost->host, 0, &tgt->ids);
5479 if (rport && tgt->action == IBMVFC_TGT_ACTION_DEL_RPORT) {
5480 tgt_dbg(tgt, "Deleting rport\n");
5484 fc_remote_port_delete(rport);
5488 } else if (rport && tgt->action == IBMVFC_TGT_ACTION_DEL_AND_LOGOUT_RPORT) {
5489 tgt_dbg(tgt, "Deleting rport with outstanding I/O\n");
5491 tgt->rport = NULL;
5494 fc_remote_port_delete(rport);
5496 } else if (rport && tgt->action == IBMVFC_TGT_ACTION_DELETED_RPORT) {
5501 if (rport) {
5502 tgt_dbg(tgt, "rport add succeeded\n");
5503 tgt->rport = rport;
5504 rport->maxframe_size = be16_to_cpu(tgt->service_parms.common.bb_rcv_sz) & 0x0fff;
5505 rport->supported_classes = 0;
5506 tgt->target_id = rport->scsi_target_id;
5508 rport->supported_classes |= FC_COS_CLASS1;
5510 rport->supported_classes |= FC_COS_CLASS2;
5512 rport->supported_classes |= FC_COS_CLASS3;
5513 if (rport->rqst_q)
5514 blk_queue_max_segments(rport->rqst_q, 1);
5516 tgt_dbg(tgt, "rport add failed\n");
5529 struct fc_rport *rport;
5632 tgt_dbg(tgt, "Deleting rport\n");
5633 rport = tgt->rport;
5634 tgt->rport = NULL;
5638 if (rport)
5639 fc_remote_port_delete(rport);
5644 tgt_dbg(tgt, "Deleting rport with I/O outstanding\n");
5645 rport = tgt->rport;
5646 tgt->rport = NULL;
5655 * rport LUNs will stay outstanding indefinitely, since the EH handlers
5659 if (rport && rport->fast_io_fail_tmo == -1)
5662 if (rport)
5663 fc_remote_port_delete(rport);
6170 * ibmvfc_rport_add_thread - Worker thread for rport adds
6179 struct fc_rport *rport;
6195 rport = tgt->rport;
6196 if (!rport) {
6199 } else if (get_device(&rport->dev)) {
6201 tgt_dbg(tgt, "Setting rport roles\n");
6202 fc_remote_port_rolechg(rport, tgt->ids.roles);
6203 put_device(&rport->dev);