Lines Matching refs:fcport

120 	fc_port_t *fcport, bool local);
521 static int qla24xx_post_nack_work(struct scsi_qla_host *vha, fc_port_t *fcport, in qla24xx_post_nack_work() argument
530 e->u.nack.fcport = fcport; in qla24xx_post_nack_work()
543 sp->name, res, sp->fcport->port_name, sp->type); in qla2x00_async_nack_sp_done()
546 sp->fcport->flags &= ~FCF_ASYNC_SENT; in qla2x00_async_nack_sp_done()
547 sp->fcport->chip_reset = vha->hw->base_qpair->chip_reset; in qla2x00_async_nack_sp_done()
551 sp->fcport->login_gen++; in qla2x00_async_nack_sp_done()
552 sp->fcport->fw_login_state = DSC_LS_PLOGI_COMP; in qla2x00_async_nack_sp_done()
553 sp->fcport->logout_on_delete = 1; in qla2x00_async_nack_sp_done()
554 sp->fcport->plogi_nack_done_deadline = jiffies + HZ; in qla2x00_async_nack_sp_done()
555 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
557 if (sp->fcport->flags & FCF_FCSP_DEVICE) { in qla2x00_async_nack_sp_done()
560 sp->fcport->port_name); in qla2x00_async_nack_sp_done()
561 qla2x00_set_fcport_disc_state(sp->fcport, in qla2x00_async_nack_sp_done()
564 sp->fcport->d_id.b24); in qla2x00_async_nack_sp_done()
565 qla_edb_eventcreate(vha, VND_CMD_AUTH_STATE_NEEDED, sp->fcport->d_id.b24, in qla2x00_async_nack_sp_done()
566 0, sp->fcport); in qla2x00_async_nack_sp_done()
571 sp->fcport->fw_login_state = DSC_LS_PRLI_COMP; in qla2x00_async_nack_sp_done()
572 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
573 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
575 if (!sp->fcport->login_succ && in qla2x00_async_nack_sp_done()
576 !IS_SW_RESV_ADDR(sp->fcport->d_id)) { in qla2x00_async_nack_sp_done()
577 sp->fcport->login_succ = 1; in qla2x00_async_nack_sp_done()
581 qla24xx_sched_upd_fcport(sp->fcport); in qla2x00_async_nack_sp_done()
584 sp->fcport->login_retry = 0; in qla2x00_async_nack_sp_done()
585 qla2x00_set_fcport_disc_state(sp->fcport, in qla2x00_async_nack_sp_done()
587 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
588 sp->fcport->logout_on_delete = 1; in qla2x00_async_nack_sp_done()
593 sp->fcport->login_gen++; in qla2x00_async_nack_sp_done()
594 sp->fcport->fw_login_state = DSC_LS_PORT_UNAVAIL; in qla2x00_async_nack_sp_done()
595 qlt_logo_completion_handler(sp->fcport, MBS_COMMAND_COMPLETE); in qla2x00_async_nack_sp_done()
603 int qla24xx_async_notify_ack(scsi_qla_host_t *vha, fc_port_t *fcport, in qla24xx_async_notify_ack() argument
610 fcport->flags |= FCF_ASYNC_SENT; in qla24xx_async_notify_ack()
613 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_async_notify_ack()
617 fcport->flags |= FCF_FCSP_DEVICE; in qla24xx_async_notify_ack()
620 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_async_notify_ack()
621 fcport->deleted = 0; in qla24xx_async_notify_ack()
625 fcport->fw_login_state = DSC_LS_LOGO_PEND; in qla24xx_async_notify_ack()
630 sp = qla2x00_get_sp(vha, fcport, GFP_ATOMIC); in qla24xx_async_notify_ack()
643 sp->name, fcport->port_name, sp->handle, c); in qla24xx_async_notify_ack()
654 fcport->flags &= ~FCF_ASYNC_SENT; in qla24xx_async_notify_ack()
664 t = e->u.nack.fcport; in qla24xx_do_nack_work()
668 t = qlt_create_sess(vha, e->u.nack.fcport, 0); in qla24xx_do_nack_work()
674 vha->hw->tgt.tgt_ops->put_sess(e->u.nack.fcport); in qla24xx_do_nack_work()
678 qla24xx_async_notify_ack(vha, e->u.nack.fcport, in qla24xx_do_nack_work()
684 fc_port_t *fcport = container_of(work, struct fc_port, del_work); in qla24xx_delete_sess_fn() local
687 if (!fcport || !fcport->vha || !fcport->vha->hw) in qla24xx_delete_sess_fn()
690 ha = fcport->vha->hw; in qla24xx_delete_sess_fn()
692 if (fcport->se_sess) { in qla24xx_delete_sess_fn()
693 ha->tgt.tgt_ops->shutdown_sess(fcport); in qla24xx_delete_sess_fn()
694 ha->tgt.tgt_ops->put_sess(fcport); in qla24xx_delete_sess_fn()
696 qlt_unreg_sess(fcport); in qla24xx_delete_sess_fn()
703 void qlt_fc_port_added(struct scsi_qla_host *vha, fc_port_t *fcport) in qlt_fc_port_added() argument
707 struct fc_port *sess = fcport; in qlt_fc_port_added()
719 if (fcport->disc_state == DSC_DELETE_PEND) { in qlt_fc_port_added()
728 sess = qlt_create_sess(vha, fcport, false); in qlt_fc_port_added()
733 if (fcport->fw_login_state == DSC_LS_PRLI_COMP) { in qlt_fc_port_added()
754 ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, in qlt_fc_port_added()
755 fcport->loop_id, in qlt_fc_port_added()
756 (fcport->flags & FCF_CONF_COMP_SUPPORTED)); in qlt_fc_port_added()
763 fcport->port_name, sess->loop_id); in qlt_fc_port_added()
817 fc_port_t *fcport = pla->fcport; in qlt_plogi_ack_unref() local
840 fcport->loop_id = loop_id; in qlt_plogi_ack_unref()
841 fcport->d_id = port_id; in qlt_plogi_ack_unref()
843 qla24xx_post_nack_work(vha, fcport, iocb, SRB_NACK_PLOGI); in qlt_plogi_ack_unref()
845 qla24xx_post_nack_work(vha, fcport, iocb, SRB_NACK_PRLI); in qlt_plogi_ack_unref()
847 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlt_plogi_ack_unref()
848 if (fcport->plogi_link[QLT_PLOGI_LINK_SAME_WWN] == pla) in qlt_plogi_ack_unref()
849 fcport->plogi_link[QLT_PLOGI_LINK_SAME_WWN] = NULL; in qlt_plogi_ack_unref()
850 if (fcport->plogi_link[QLT_PLOGI_LINK_CONFLICT] == pla) in qlt_plogi_ack_unref()
851 fcport->plogi_link[QLT_PLOGI_LINK_CONFLICT] = NULL; in qlt_plogi_ack_unref()
889 pla->fcport = sess; in qlt_plogi_ack_link()
1373 fc_port_t *fcport, in qlt_create_sess() argument
1377 struct fc_port *sess = fcport; in qlt_create_sess()
1383 if (fcport->se_sess) { in qlt_create_sess()
1390 return fcport; in qlt_create_sess()
1406 &fcport->port_name[0], sess) < 0) { in qlt_create_sess()
1409 vha->vp_idx, fcport->port_name); in qlt_create_sess()
1412 kref_init(&fcport->sess_kref); in qlt_create_sess()
1440 vha->vp_idx, local ? "local " : "", fcport->port_name, in qlt_create_sess()
1441 fcport->loop_id, sess->d_id.b.domain, sess->d_id.b.area, in qlt_create_sess()
1452 qlt_fc_port_deleted(struct scsi_qla_host *vha, fc_port_t *fcport, int max_gen) in qlt_fc_port_deleted() argument
1455 struct fc_port *sess = fcport; in qlt_fc_port_deleted()
4595 void qlt_logo_completion_handler(fc_port_t *fcport, int rc) in qlt_logo_completion_handler() argument
4598 ql_dbg(ql_dbg_tgt_mgt, fcport->vha, 0xf093, in qlt_logo_completion_handler()
4603 fcport->se_sess, in qlt_logo_completion_handler()
4604 fcport, in qlt_logo_completion_handler()
4605 fcport->port_name, fcport->loop_id, in qlt_logo_completion_handler()
4606 fcport->d_id.b.domain, fcport->d_id.b.area, in qlt_logo_completion_handler()
4607 fcport->d_id.b.al_pa, rc); in qlt_logo_completion_handler()
4610 fcport->logout_completed = 1; in qlt_logo_completion_handler()
6112 fc_port_t *fcport, *tfcp, *del; in qlt_get_port_database() local
6117 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qlt_get_port_database()
6118 if (!fcport) { in qlt_get_port_database()
6125 fcport->loop_id = loop_id; in qlt_get_port_database()
6127 rc = qla24xx_gpdb_wait(vha, fcport, 0); in qlt_get_port_database()
6133 kfree(fcport); in qlt_get_port_database()
6139 tfcp = qla2x00_find_fcport_by_wwpn(vha, fcport->port_name, 1); in qlt_get_port_database()
6142 tfcp->d_id = fcport->d_id; in qlt_get_port_database()
6143 tfcp->port_type = fcport->port_type; in qlt_get_port_database()
6144 tfcp->supported_classes = fcport->supported_classes; in qlt_get_port_database()
6145 tfcp->flags |= fcport->flags; in qlt_get_port_database()
6148 del = fcport; in qlt_get_port_database()
6149 fcport = tfcp; in qlt_get_port_database()
6152 fcport->flags |= FCF_FABRIC_DEVICE; in qlt_get_port_database()
6154 list_add_tail(&fcport->list, &vha->vp_fcports); in qlt_get_port_database()
6155 if (!IS_SW_RESV_ADDR(fcport->d_id)) in qlt_get_port_database()
6157 fcport->login_gen++; in qlt_get_port_database()
6158 qla2x00_set_fcport_disc_state(fcport, DSC_LOGIN_COMPLETE); in qlt_get_port_database()
6159 fcport->login_succ = 1; in qlt_get_port_database()
6163 fcport->deleted = 0; in qlt_get_port_database()
6171 qla24xx_sched_upd_fcport(fcport); in qlt_get_port_database()
6175 __func__, __LINE__, fcport->port_name, vha->fcport_count); in qlt_get_port_database()
6176 qla24xx_post_gpsc_work(vha, fcport); in qlt_get_port_database()
6188 return fcport; in qlt_get_port_database()
6196 fc_port_t *fcport = NULL; in qlt_make_local_sess() local
6237 fcport = qlt_get_port_database(vha, loop_id); in qlt_make_local_sess()
6238 if (!fcport) { in qlt_make_local_sess()
6254 sess = qlt_create_sess(vha, fcport, true); in qlt_make_local_sess()