Lines Matching refs:fcport
138 fc_port_t *fcport, bool local);
555 static int qla24xx_post_nack_work(struct scsi_qla_host *vha, fc_port_t *fcport, in qla24xx_post_nack_work() argument
563 e->u.nack.fcport = fcport; in qla24xx_post_nack_work()
578 sp->name, res, sp->fcport->port_name, sp->type); in qla2x00_async_nack_sp_done()
581 sp->fcport->flags &= ~FCF_ASYNC_SENT; in qla2x00_async_nack_sp_done()
582 sp->fcport->chip_reset = vha->hw->base_qpair->chip_reset; in qla2x00_async_nack_sp_done()
586 sp->fcport->login_gen++; in qla2x00_async_nack_sp_done()
587 sp->fcport->fw_login_state = DSC_LS_PLOGI_COMP; in qla2x00_async_nack_sp_done()
588 sp->fcport->logout_on_delete = 1; in qla2x00_async_nack_sp_done()
589 sp->fcport->plogi_nack_done_deadline = jiffies + HZ; in qla2x00_async_nack_sp_done()
590 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
594 sp->fcport->fw_login_state = DSC_LS_PRLI_COMP; in qla2x00_async_nack_sp_done()
595 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
596 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
598 if (!sp->fcport->login_succ && in qla2x00_async_nack_sp_done()
599 !IS_SW_RESV_ADDR(sp->fcport->d_id)) { in qla2x00_async_nack_sp_done()
600 sp->fcport->login_succ = 1; in qla2x00_async_nack_sp_done()
607 sp->fcport->port_name, in qla2x00_async_nack_sp_done()
609 sp->fcport->disc_state = DSC_UPD_FCPORT; in qla2x00_async_nack_sp_done()
610 qla24xx_post_upd_fcport_work(vha, sp->fcport); in qla2x00_async_nack_sp_done()
612 sp->fcport->login_retry = 0; in qla2x00_async_nack_sp_done()
613 sp->fcport->disc_state = DSC_LOGIN_COMPLETE; in qla2x00_async_nack_sp_done()
614 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
615 sp->fcport->logout_on_delete = 1; in qla2x00_async_nack_sp_done()
620 sp->fcport->login_gen++; in qla2x00_async_nack_sp_done()
621 sp->fcport->fw_login_state = DSC_LS_PORT_UNAVAIL; in qla2x00_async_nack_sp_done()
622 qlt_logo_completion_handler(sp->fcport, MBS_COMMAND_COMPLETE); in qla2x00_async_nack_sp_done()
630 int qla24xx_async_notify_ack(scsi_qla_host_t *vha, fc_port_t *fcport, in qla24xx_async_notify_ack() argument
637 fcport->flags |= FCF_ASYNC_SENT; in qla24xx_async_notify_ack()
640 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_async_notify_ack()
644 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_async_notify_ack()
645 fcport->deleted = 0; in qla24xx_async_notify_ack()
649 fcport->fw_login_state = DSC_LS_LOGO_PEND; in qla24xx_async_notify_ack()
654 sp = qla2x00_get_sp(vha, fcport, GFP_ATOMIC); in qla24xx_async_notify_ack()
673 sp->name, fcport->port_name, sp->handle, c); in qla24xx_async_notify_ack()
680 fcport->flags &= ~FCF_ASYNC_SENT; in qla24xx_async_notify_ack()
692 t = qlt_create_sess(vha, e->u.nack.fcport, 0); in qla24xx_do_nack_work()
699 vha->hw->tgt.tgt_ops->put_sess(e->u.nack.fcport); in qla24xx_do_nack_work()
704 qla24xx_async_notify_ack(vha, e->u.nack.fcport, in qla24xx_do_nack_work()
710 fc_port_t *fcport = container_of(work, struct fc_port, del_work); in qla24xx_delete_sess_fn() local
711 struct qla_hw_data *ha = fcport->vha->hw; in qla24xx_delete_sess_fn()
716 if (fcport->se_sess) { in qla24xx_delete_sess_fn()
717 ha->tgt.tgt_ops->shutdown_sess(fcport); in qla24xx_delete_sess_fn()
718 ha->tgt.tgt_ops->put_sess(fcport); in qla24xx_delete_sess_fn()
720 qlt_unreg_sess(fcport); in qla24xx_delete_sess_fn()
728 void qlt_fc_port_added(struct scsi_qla_host *vha, fc_port_t *fcport) in qlt_fc_port_added() argument
732 struct fc_port *sess = fcport; in qlt_fc_port_added()
744 if (fcport->disc_state == DSC_DELETE_PEND) { in qlt_fc_port_added()
753 sess = qlt_create_sess(vha, fcport, false); in qlt_fc_port_added()
758 if (fcport->fw_login_state == DSC_LS_PRLI_COMP) { in qlt_fc_port_added()
779 ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, in qlt_fc_port_added()
780 fcport->loop_id, in qlt_fc_port_added()
781 (fcport->flags & FCF_CONF_COMP_SUPPORTED)); in qlt_fc_port_added()
788 fcport->port_name, sess->loop_id); in qlt_fc_port_added()
839 fc_port_t *fcport = pla->fcport; in qlt_plogi_ack_unref() local
862 fcport->loop_id = loop_id; in qlt_plogi_ack_unref()
863 fcport->d_id = port_id; in qlt_plogi_ack_unref()
865 qla24xx_post_nack_work(vha, fcport, iocb, SRB_NACK_PLOGI); in qlt_plogi_ack_unref()
867 qla24xx_post_nack_work(vha, fcport, iocb, SRB_NACK_PRLI); in qlt_plogi_ack_unref()
869 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlt_plogi_ack_unref()
870 if (fcport->plogi_link[QLT_PLOGI_LINK_SAME_WWN] == pla) in qlt_plogi_ack_unref()
871 fcport->plogi_link[QLT_PLOGI_LINK_SAME_WWN] = NULL; in qlt_plogi_ack_unref()
872 if (fcport->plogi_link[QLT_PLOGI_LINK_CONFLICT] == pla) in qlt_plogi_ack_unref()
873 fcport->plogi_link[QLT_PLOGI_LINK_CONFLICT] = NULL; in qlt_plogi_ack_unref()
911 pla->fcport = sess; in qlt_plogi_ack_link()
1338 fc_port_t *fcport, in qlt_create_sess() argument
1342 struct fc_port *sess = fcport; in qlt_create_sess()
1348 if (fcport->se_sess) { in qlt_create_sess()
1355 return fcport; in qlt_create_sess()
1371 &fcport->port_name[0], sess) < 0) { in qlt_create_sess()
1374 vha->vp_idx, fcport->port_name); in qlt_create_sess()
1377 kref_init(&fcport->sess_kref); in qlt_create_sess()
1405 vha->vp_idx, local ? "local " : "", fcport->port_name, in qlt_create_sess()
1406 fcport->loop_id, sess->d_id.b.domain, sess->d_id.b.area, in qlt_create_sess()
1417 qlt_fc_port_deleted(struct scsi_qla_host *vha, fc_port_t *fcport, int max_gen) in qlt_fc_port_deleted() argument
1420 struct fc_port *sess = fcport; in qlt_fc_port_deleted()
4552 void qlt_logo_completion_handler(fc_port_t *fcport, int rc) in qlt_logo_completion_handler() argument
4555 ql_dbg(ql_dbg_tgt_mgt, fcport->vha, 0xf093, in qlt_logo_completion_handler()
4560 fcport->se_sess, in qlt_logo_completion_handler()
4561 fcport, in qlt_logo_completion_handler()
4562 fcport->port_name, fcport->loop_id, in qlt_logo_completion_handler()
4563 fcport->d_id.b.domain, fcport->d_id.b.area, in qlt_logo_completion_handler()
4564 fcport->d_id.b.al_pa, rc); in qlt_logo_completion_handler()
4567 fcport->logout_completed = 1; in qlt_logo_completion_handler()
5908 fc_port_t *fcport, *tfcp, *del; in qlt_get_port_database() local
5913 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qlt_get_port_database()
5914 if (!fcport) { in qlt_get_port_database()
5921 fcport->loop_id = loop_id; in qlt_get_port_database()
5923 rc = qla24xx_gpdb_wait(vha, fcport, 0); in qlt_get_port_database()
5929 kfree(fcport); in qlt_get_port_database()
5935 tfcp = qla2x00_find_fcport_by_wwpn(vha, fcport->port_name, 1); in qlt_get_port_database()
5938 tfcp->d_id = fcport->d_id; in qlt_get_port_database()
5939 tfcp->port_type = fcport->port_type; in qlt_get_port_database()
5940 tfcp->supported_classes = fcport->supported_classes; in qlt_get_port_database()
5941 tfcp->flags |= fcport->flags; in qlt_get_port_database()
5944 del = fcport; in qlt_get_port_database()
5945 fcport = tfcp; in qlt_get_port_database()
5948 fcport->flags |= FCF_FABRIC_DEVICE; in qlt_get_port_database()
5950 list_add_tail(&fcport->list, &vha->vp_fcports); in qlt_get_port_database()
5951 if (!IS_SW_RESV_ADDR(fcport->d_id)) in qlt_get_port_database()
5953 fcport->login_gen++; in qlt_get_port_database()
5954 fcport->disc_state = DSC_LOGIN_COMPLETE; in qlt_get_port_database()
5955 fcport->login_succ = 1; in qlt_get_port_database()
5959 fcport->deleted = 0; in qlt_get_port_database()
5969 __func__, __LINE__, fcport->port_name, vha->fcport_count); in qlt_get_port_database()
5970 qla24xx_post_upd_fcport_work(vha, fcport); in qlt_get_port_database()
5974 __func__, __LINE__, fcport->port_name, vha->fcport_count); in qlt_get_port_database()
5975 qla24xx_post_gpsc_work(vha, fcport); in qlt_get_port_database()
5987 return fcport; in qlt_get_port_database()
5995 fc_port_t *fcport = NULL; in qlt_make_local_sess() local
6036 fcport = qlt_get_port_database(vha, loop_id); in qlt_make_local_sess()
6037 if (!fcport) { in qlt_make_local_sess()
6053 sess = qlt_create_sess(vha, fcport, true); in qlt_make_local_sess()