Lines Matching refs:fcport

127 	fc_port_t *fcport, bool local);
545 static int qla24xx_post_nack_work(struct scsi_qla_host *vha, fc_port_t *fcport, in qla24xx_post_nack_work() argument
554 e->u.nack.fcport = fcport; in qla24xx_post_nack_work()
567 sp->name, res, sp->fcport->port_name, sp->type); in qla2x00_async_nack_sp_done()
570 sp->fcport->flags &= ~FCF_ASYNC_SENT; in qla2x00_async_nack_sp_done()
571 sp->fcport->chip_reset = vha->hw->base_qpair->chip_reset; in qla2x00_async_nack_sp_done()
575 sp->fcport->login_gen++; in qla2x00_async_nack_sp_done()
576 sp->fcport->fw_login_state = DSC_LS_PLOGI_COMP; in qla2x00_async_nack_sp_done()
577 sp->fcport->logout_on_delete = 1; in qla2x00_async_nack_sp_done()
578 sp->fcport->plogi_nack_done_deadline = jiffies + HZ; in qla2x00_async_nack_sp_done()
579 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
583 sp->fcport->fw_login_state = DSC_LS_PRLI_COMP; in qla2x00_async_nack_sp_done()
584 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
585 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
587 if (!sp->fcport->login_succ && in qla2x00_async_nack_sp_done()
588 !IS_SW_RESV_ADDR(sp->fcport->d_id)) { in qla2x00_async_nack_sp_done()
589 sp->fcport->login_succ = 1; in qla2x00_async_nack_sp_done()
593 qla24xx_sched_upd_fcport(sp->fcport); in qla2x00_async_nack_sp_done()
596 sp->fcport->login_retry = 0; in qla2x00_async_nack_sp_done()
597 qla2x00_set_fcport_disc_state(sp->fcport, in qla2x00_async_nack_sp_done()
599 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
600 sp->fcport->logout_on_delete = 1; in qla2x00_async_nack_sp_done()
605 sp->fcport->login_gen++; in qla2x00_async_nack_sp_done()
606 sp->fcport->fw_login_state = DSC_LS_PORT_UNAVAIL; in qla2x00_async_nack_sp_done()
607 qlt_logo_completion_handler(sp->fcport, MBS_COMMAND_COMPLETE); in qla2x00_async_nack_sp_done()
615 int qla24xx_async_notify_ack(scsi_qla_host_t *vha, fc_port_t *fcport, in qla24xx_async_notify_ack() argument
622 fcport->flags |= FCF_ASYNC_SENT; in qla24xx_async_notify_ack()
625 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_async_notify_ack()
629 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_async_notify_ack()
630 fcport->deleted = 0; in qla24xx_async_notify_ack()
634 fcport->fw_login_state = DSC_LS_LOGO_PEND; in qla24xx_async_notify_ack()
639 sp = qla2x00_get_sp(vha, fcport, GFP_ATOMIC); in qla24xx_async_notify_ack()
654 sp->name, fcport->port_name, sp->handle, c); in qla24xx_async_notify_ack()
665 fcport->flags &= ~FCF_ASYNC_SENT; in qla24xx_async_notify_ack()
675 t = e->u.nack.fcport; in qla24xx_do_nack_work()
679 t = qlt_create_sess(vha, e->u.nack.fcport, 0); in qla24xx_do_nack_work()
685 vha->hw->tgt.tgt_ops->put_sess(e->u.nack.fcport); in qla24xx_do_nack_work()
689 qla24xx_async_notify_ack(vha, e->u.nack.fcport, in qla24xx_do_nack_work()
695 fc_port_t *fcport = container_of(work, struct fc_port, del_work); in qla24xx_delete_sess_fn() local
696 struct qla_hw_data *ha = fcport->vha->hw; in qla24xx_delete_sess_fn()
698 if (fcport->se_sess) { in qla24xx_delete_sess_fn()
699 ha->tgt.tgt_ops->shutdown_sess(fcport); in qla24xx_delete_sess_fn()
700 ha->tgt.tgt_ops->put_sess(fcport); in qla24xx_delete_sess_fn()
702 qlt_unreg_sess(fcport); in qla24xx_delete_sess_fn()
709 void qlt_fc_port_added(struct scsi_qla_host *vha, fc_port_t *fcport) in qlt_fc_port_added() argument
713 struct fc_port *sess = fcport; in qlt_fc_port_added()
725 if (fcport->disc_state == DSC_DELETE_PEND) { in qlt_fc_port_added()
734 sess = qlt_create_sess(vha, fcport, false); in qlt_fc_port_added()
739 if (fcport->fw_login_state == DSC_LS_PRLI_COMP) { in qlt_fc_port_added()
760 ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, in qlt_fc_port_added()
761 fcport->loop_id, in qlt_fc_port_added()
762 (fcport->flags & FCF_CONF_COMP_SUPPORTED)); in qlt_fc_port_added()
769 fcport->port_name, sess->loop_id); in qlt_fc_port_added()
823 fc_port_t *fcport = pla->fcport; in qlt_plogi_ack_unref() local
846 fcport->loop_id = loop_id; in qlt_plogi_ack_unref()
847 fcport->d_id = port_id; in qlt_plogi_ack_unref()
849 qla24xx_post_nack_work(vha, fcport, iocb, SRB_NACK_PLOGI); in qlt_plogi_ack_unref()
851 qla24xx_post_nack_work(vha, fcport, iocb, SRB_NACK_PRLI); in qlt_plogi_ack_unref()
853 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlt_plogi_ack_unref()
854 if (fcport->plogi_link[QLT_PLOGI_LINK_SAME_WWN] == pla) in qlt_plogi_ack_unref()
855 fcport->plogi_link[QLT_PLOGI_LINK_SAME_WWN] = NULL; in qlt_plogi_ack_unref()
856 if (fcport->plogi_link[QLT_PLOGI_LINK_CONFLICT] == pla) in qlt_plogi_ack_unref()
857 fcport->plogi_link[QLT_PLOGI_LINK_CONFLICT] = NULL; in qlt_plogi_ack_unref()
895 pla->fcport = sess; in qlt_plogi_ack_link()
1349 fc_port_t *fcport, in qlt_create_sess() argument
1353 struct fc_port *sess = fcport; in qlt_create_sess()
1359 if (fcport->se_sess) { in qlt_create_sess()
1366 return fcport; in qlt_create_sess()
1382 &fcport->port_name[0], sess) < 0) { in qlt_create_sess()
1385 vha->vp_idx, fcport->port_name); in qlt_create_sess()
1388 kref_init(&fcport->sess_kref); in qlt_create_sess()
1416 vha->vp_idx, local ? "local " : "", fcport->port_name, in qlt_create_sess()
1417 fcport->loop_id, sess->d_id.b.domain, sess->d_id.b.area, in qlt_create_sess()
1428 qlt_fc_port_deleted(struct scsi_qla_host *vha, fc_port_t *fcport, int max_gen) in qlt_fc_port_deleted() argument
1431 struct fc_port *sess = fcport; in qlt_fc_port_deleted()
4545 void qlt_logo_completion_handler(fc_port_t *fcport, int rc) in qlt_logo_completion_handler() argument
4548 ql_dbg(ql_dbg_tgt_mgt, fcport->vha, 0xf093, in qlt_logo_completion_handler()
4553 fcport->se_sess, in qlt_logo_completion_handler()
4554 fcport, in qlt_logo_completion_handler()
4555 fcport->port_name, fcport->loop_id, in qlt_logo_completion_handler()
4556 fcport->d_id.b.domain, fcport->d_id.b.area, in qlt_logo_completion_handler()
4557 fcport->d_id.b.al_pa, rc); in qlt_logo_completion_handler()
4560 fcport->logout_completed = 1; in qlt_logo_completion_handler()
6009 fc_port_t *fcport, *tfcp, *del; in qlt_get_port_database() local
6014 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qlt_get_port_database()
6015 if (!fcport) { in qlt_get_port_database()
6022 fcport->loop_id = loop_id; in qlt_get_port_database()
6024 rc = qla24xx_gpdb_wait(vha, fcport, 0); in qlt_get_port_database()
6030 kfree(fcport); in qlt_get_port_database()
6036 tfcp = qla2x00_find_fcport_by_wwpn(vha, fcport->port_name, 1); in qlt_get_port_database()
6039 tfcp->d_id = fcport->d_id; in qlt_get_port_database()
6040 tfcp->port_type = fcport->port_type; in qlt_get_port_database()
6041 tfcp->supported_classes = fcport->supported_classes; in qlt_get_port_database()
6042 tfcp->flags |= fcport->flags; in qlt_get_port_database()
6045 del = fcport; in qlt_get_port_database()
6046 fcport = tfcp; in qlt_get_port_database()
6049 fcport->flags |= FCF_FABRIC_DEVICE; in qlt_get_port_database()
6051 list_add_tail(&fcport->list, &vha->vp_fcports); in qlt_get_port_database()
6052 if (!IS_SW_RESV_ADDR(fcport->d_id)) in qlt_get_port_database()
6054 fcport->login_gen++; in qlt_get_port_database()
6055 qla2x00_set_fcport_disc_state(fcport, DSC_LOGIN_COMPLETE); in qlt_get_port_database()
6056 fcport->login_succ = 1; in qlt_get_port_database()
6060 fcport->deleted = 0; in qlt_get_port_database()
6068 qla24xx_sched_upd_fcport(fcport); in qlt_get_port_database()
6072 __func__, __LINE__, fcport->port_name, vha->fcport_count); in qlt_get_port_database()
6073 qla24xx_post_gpsc_work(vha, fcport); in qlt_get_port_database()
6085 return fcport; in qlt_get_port_database()
6093 fc_port_t *fcport = NULL; in qlt_make_local_sess() local
6134 fcport = qlt_get_port_database(vha, loop_id); in qlt_make_local_sess()
6135 if (!fcport) { in qlt_make_local_sess()
6151 sess = qlt_create_sess(vha, fcport, true); in qlt_make_local_sess()