Lines Matching defs:rport
1077 * ibmvfc_set_rport_dev_loss_tmo - Set rport's device loss timeout
1078 * @rport: rport struct
1084 static void ibmvfc_set_rport_dev_loss_tmo(struct fc_rport *rport, u32 timeout)
1087 rport->dev_loss_tmo = timeout;
1089 rport->dev_loss_tmo = 1;
1556 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
1560 if (rport == tgt->rport) {
1666 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
1671 if (unlikely((rc = fc_remote_port_chkready(rport))) ||
1691 vfc_cmd->tgt_scsi_id = cpu_to_be64(rport->port_id);
1870 struct fc_rport *rport = fc_bsg_to_rport(job);
1883 if (rport)
1884 port_id = rport->port_id;
1942 if (unlikely(rc || (rport && (rc = fc_remote_port_chkready(rport)))) ||
2020 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
2042 tmf->tgt_scsi_id = cpu_to_be64(rport->port_id);
2087 * @device: device to match (rport)
2090 * 1 if event matches rport / 0 if event does not match rport
2092 static int ibmvfc_match_rport(struct ibmvfc_event *evt, void *rport)
2098 if (cmd_rport == rport)
2204 struct fc_rport *rport = starget_to_rport(starget);
2238 tmf->scsi_id = cpu_to_be64(rport->port_id);
2335 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
2372 tmf->tgt_scsi_id = cpu_to_be64(rport->port_id);
2587 * ibmvfc_terminate_rport_io - Terminate all pending I/O to the rport.
2588 * @rport: rport struct
2593 static void ibmvfc_terminate_rport_io(struct fc_rport *rport)
2595 struct Scsi_Host *shost = rport_to_shost(rport);
2606 if (dev_rport != rport)
2611 rc = ibmvfc_wait_for_ops(vhost, rport, ibmvfc_match_rport);
2619 if (tgt->scsi_id == rport->port_id) {
2917 struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
2921 if (!rport || fc_remote_port_chkready(rport))
4164 * deleted the rport from the FC transport so we do a move
4182 wtgt->action, wtgt->rport);
4601 struct fc_rport *rport;
4604 tgt_dbg(tgt, "Adding rport\n");
4605 rport = fc_remote_port_add(vhost->host, 0, &tgt->ids);
4608 if (rport && tgt->action == IBMVFC_TGT_ACTION_DEL_RPORT) {
4609 tgt_dbg(tgt, "Deleting rport\n");
4613 fc_remote_port_delete(rport);
4617 } else if (rport && tgt->action == IBMVFC_TGT_ACTION_DEL_AND_LOGOUT_RPORT) {
4618 tgt_dbg(tgt, "Deleting rport with outstanding I/O\n");
4620 tgt->rport = NULL;
4622 fc_remote_port_delete(rport);
4624 } else if (rport && tgt->action == IBMVFC_TGT_ACTION_DELETED_RPORT) {
4629 if (rport) {
4630 tgt_dbg(tgt, "rport add succeeded\n");
4631 tgt->rport = rport;
4632 rport->maxframe_size = be16_to_cpu(tgt->service_parms.common.bb_rcv_sz) & 0x0fff;
4633 rport->supported_classes = 0;
4634 tgt->target_id = rport->scsi_target_id;
4636 rport->supported_classes |= FC_COS_CLASS1;
4638 rport->supported_classes |= FC_COS_CLASS2;
4640 rport->supported_classes |= FC_COS_CLASS3;
4641 if (rport->rqst_q)
4642 blk_queue_max_segments(rport->rqst_q, 1);
4644 tgt_dbg(tgt, "rport add failed\n");
4657 struct fc_rport *rport;
4755 tgt_dbg(tgt, "Deleting rport\n");
4756 rport = tgt->rport;
4757 tgt->rport = NULL;
4761 if (rport)
4762 fc_remote_port_delete(rport);
4767 tgt_dbg(tgt, "Deleting rport with I/O outstanding\n");
4768 rport = tgt->rport;
4769 tgt->rport = NULL;
4772 if (rport)
4773 fc_remote_port_delete(rport);
5054 * ibmvfc_rport_add_thread - Worker thread for rport adds
5063 struct fc_rport *rport;
5079 rport = tgt->rport;
5080 if (!rport) {
5083 } else if (get_device(&rport->dev)) {
5085 tgt_dbg(tgt, "Setting rport roles\n");
5086 fc_remote_port_rolechg(rport, tgt->ids.roles);
5087 put_device(&rport->dev);