Lines Matching defs:fcport

120 	fc_port_t *fcport, bool local);
521 static int qla24xx_post_nack_work(struct scsi_qla_host *vha, fc_port_t *fcport,
530 e->u.nack.fcport = fcport;
543 sp->name, res, sp->fcport->port_name, sp->type);
546 sp->fcport->flags &= ~FCF_ASYNC_SENT;
547 sp->fcport->chip_reset = vha->hw->base_qpair->chip_reset;
551 sp->fcport->login_gen++;
552 sp->fcport->fw_login_state = DSC_LS_PLOGI_COMP;
553 sp->fcport->logout_on_delete = 1;
554 sp->fcport->plogi_nack_done_deadline = jiffies + HZ;
555 sp->fcport->send_els_logo = 0;
557 if (sp->fcport->flags & FCF_FCSP_DEVICE) {
560 sp->fcport->port_name);
561 qla2x00_set_fcport_disc_state(sp->fcport,
564 sp->fcport->d_id.b24);
565 qla_edb_eventcreate(vha, VND_CMD_AUTH_STATE_NEEDED, sp->fcport->d_id.b24,
566 0, sp->fcport);
571 sp->fcport->fw_login_state = DSC_LS_PRLI_COMP;
572 sp->fcport->deleted = 0;
573 sp->fcport->send_els_logo = 0;
575 if (!sp->fcport->login_succ &&
576 !IS_SW_RESV_ADDR(sp->fcport->d_id)) {
577 sp->fcport->login_succ = 1;
581 qla24xx_sched_upd_fcport(sp->fcport);
584 sp->fcport->login_retry = 0;
585 qla2x00_set_fcport_disc_state(sp->fcport,
587 sp->fcport->deleted = 0;
588 sp->fcport->logout_on_delete = 1;
593 sp->fcport->login_gen++;
594 sp->fcport->fw_login_state = DSC_LS_PORT_UNAVAIL;
595 qlt_logo_completion_handler(sp->fcport, MBS_COMMAND_COMPLETE);
603 int qla24xx_async_notify_ack(scsi_qla_host_t *vha, fc_port_t *fcport,
610 fcport->flags |= FCF_ASYNC_SENT;
613 fcport->fw_login_state = DSC_LS_PLOGI_PEND;
617 fcport->flags |= FCF_FCSP_DEVICE;
620 fcport->fw_login_state = DSC_LS_PRLI_PEND;
621 fcport->deleted = 0;
625 fcport->fw_login_state = DSC_LS_LOGO_PEND;
630 sp = qla2x00_get_sp(vha, fcport, GFP_ATOMIC);
643 sp->name, fcport->port_name, sp->handle, c);
654 fcport->flags &= ~FCF_ASYNC_SENT;
664 t = e->u.nack.fcport;
668 t = qlt_create_sess(vha, e->u.nack.fcport, 0);
674 vha->hw->tgt.tgt_ops->put_sess(e->u.nack.fcport);
678 qla24xx_async_notify_ack(vha, e->u.nack.fcport,
684 fc_port_t *fcport = container_of(work, struct fc_port, del_work);
687 if (!fcport || !fcport->vha || !fcport->vha->hw)
690 ha = fcport->vha->hw;
692 if (fcport->se_sess) {
693 ha->tgt.tgt_ops->shutdown_sess(fcport);
694 ha->tgt.tgt_ops->put_sess(fcport);
696 qlt_unreg_sess(fcport);
703 void qlt_fc_port_added(struct scsi_qla_host *vha, fc_port_t *fcport)
707 struct fc_port *sess = fcport;
719 if (fcport->disc_state == DSC_DELETE_PEND) {
728 sess = qlt_create_sess(vha, fcport, false);
733 if (fcport->fw_login_state == DSC_LS_PRLI_COMP) {
754 ha->tgt.tgt_ops->update_sess(sess, fcport->d_id,
755 fcport->loop_id,
756 (fcport->flags & FCF_CONF_COMP_SUPPORTED));
763 fcport->port_name, sess->loop_id);
817 fc_port_t *fcport = pla->fcport;
840 fcport->loop_id = loop_id;
841 fcport->d_id = port_id;
843 qla24xx_post_nack_work(vha, fcport, iocb, SRB_NACK_PLOGI);
845 qla24xx_post_nack_work(vha, fcport, iocb, SRB_NACK_PRLI);
847 list_for_each_entry(fcport, &vha->vp_fcports, list) {
848 if (fcport->plogi_link[QLT_PLOGI_LINK_SAME_WWN] == pla)
849 fcport->plogi_link[QLT_PLOGI_LINK_SAME_WWN] = NULL;
850 if (fcport->plogi_link[QLT_PLOGI_LINK_CONFLICT] == pla)
851 fcport->plogi_link[QLT_PLOGI_LINK_CONFLICT] = NULL;
889 pla->fcport = sess;
1383 fc_port_t *fcport,
1387 struct fc_port *sess = fcport;
1393 if (fcport->se_sess) {
1400 return fcport;
1416 &fcport->port_name[0], sess) < 0) {
1419 vha->vp_idx, fcport->port_name);
1422 kref_init(&fcport->sess_kref);
1450 vha->vp_idx, local ? "local " : "", fcport->port_name,
1451 fcport->loop_id, sess->d_id.b.domain, sess->d_id.b.area,
1462 qlt_fc_port_deleted(struct scsi_qla_host *vha, fc_port_t *fcport, int max_gen)
1465 struct fc_port *sess = fcport;
4604 void qlt_logo_completion_handler(fc_port_t *fcport, int rc)
4607 ql_dbg(ql_dbg_tgt_mgt, fcport->vha, 0xf093,
4612 fcport->se_sess,
4613 fcport,
4614 fcport->port_name, fcport->loop_id,
4615 fcport->d_id.b.domain, fcport->d_id.b.area,
4616 fcport->d_id.b.al_pa, rc);
4619 fcport->logout_completed = 1;
6121 fc_port_t *fcport, *tfcp, *del;
6126 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL);
6127 if (!fcport) {
6134 fcport->loop_id = loop_id;
6136 rc = qla24xx_gpdb_wait(vha, fcport, 0);
6139 "qla_target(%d): Failed to retrieve fcport "
6142 kfree(fcport);
6148 tfcp = qla2x00_find_fcport_by_wwpn(vha, fcport->port_name, 1);
6151 tfcp->d_id = fcport->d_id;
6152 tfcp->port_type = fcport->port_type;
6153 tfcp->supported_classes = fcport->supported_classes;
6154 tfcp->flags |= fcport->flags;
6157 del = fcport;
6158 fcport = tfcp;
6161 fcport->flags |= FCF_FABRIC_DEVICE;
6163 list_add_tail(&fcport->list, &vha->vp_fcports);
6164 if (!IS_SW_RESV_ADDR(fcport->d_id))
6166 fcport->login_gen++;
6167 qla2x00_set_fcport_disc_state(fcport, DSC_LOGIN_COMPLETE);
6168 fcport->login_succ = 1;
6172 fcport->deleted = 0;
6180 qla24xx_sched_upd_fcport(fcport);
6184 __func__, __LINE__, fcport->port_name, vha->fcport_count);
6185 qla24xx_post_gpsc_work(vha, fcport);
6197 return fcport;
6205 fc_port_t *fcport = NULL;
6246 fcport = qlt_get_port_database(vha, loop_id);
6247 if (!fcport) {
6263 sess = qlt_create_sess(vha, fcport, true);