aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_target.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_target.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 0e09d8f433d..62aa5584f64 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -557,6 +557,7 @@ static bool qlt_check_fcport_exist(struct scsi_qla_host *vha,
557 int pmap_len; 557 int pmap_len;
558 fc_port_t *fcport; 558 fc_port_t *fcport;
559 int global_resets; 559 int global_resets;
560 unsigned long flags;
560 561
561retry: 562retry:
562 global_resets = atomic_read(&ha->tgt.qla_tgt->tgt_global_resets_count); 563 global_resets = atomic_read(&ha->tgt.qla_tgt->tgt_global_resets_count);
@@ -625,10 +626,10 @@ retry:
625 sess->s_id.b.area, sess->loop_id, fcport->d_id.b.domain, 626 sess->s_id.b.area, sess->loop_id, fcport->d_id.b.domain,
626 fcport->d_id.b.al_pa, fcport->d_id.b.area, fcport->loop_id); 627 fcport->d_id.b.al_pa, fcport->d_id.b.area, fcport->loop_id);
627 628
628 sess->s_id = fcport->d_id; 629 spin_lock_irqsave(&ha->hardware_lock, flags);
629 sess->loop_id = fcport->loop_id; 630 ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, fcport->loop_id,
630 sess->conf_compl_supported = !!(fcport->flags & 631 (fcport->flags & FCF_CONF_COMP_SUPPORTED));
631 FCF_CONF_COMP_SUPPORTED); 632 spin_unlock_irqrestore(&ha->hardware_lock, flags);
632 633
633 res = true; 634 res = true;
634 635
@@ -740,10 +741,9 @@ static struct qla_tgt_sess *qlt_create_sess(
740 qlt_undelete_sess(sess); 741 qlt_undelete_sess(sess);
741 742
742 kref_get(&sess->se_sess->sess_kref); 743 kref_get(&sess->se_sess->sess_kref);
743 sess->s_id = fcport->d_id; 744 ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, fcport->loop_id,
744 sess->loop_id = fcport->loop_id; 745 (fcport->flags & FCF_CONF_COMP_SUPPORTED));
745 sess->conf_compl_supported = !!(fcport->flags & 746
746 FCF_CONF_COMP_SUPPORTED);
747 if (sess->local && !local) 747 if (sess->local && !local)
748 sess->local = 0; 748 sess->local = 0;
749 spin_unlock_irqrestore(&ha->hardware_lock, flags); 749 spin_unlock_irqrestore(&ha->hardware_lock, flags);
@@ -796,8 +796,7 @@ static struct qla_tgt_sess *qlt_create_sess(
796 */ 796 */
797 kref_get(&sess->se_sess->sess_kref); 797 kref_get(&sess->se_sess->sess_kref);
798 798
799 sess->conf_compl_supported = !!(fcport->flags & 799 sess->conf_compl_supported = (fcport->flags & FCF_CONF_COMP_SUPPORTED);
800 FCF_CONF_COMP_SUPPORTED);
801 BUILD_BUG_ON(sizeof(sess->port_name) != sizeof(fcport->port_name)); 800 BUILD_BUG_ON(sizeof(sess->port_name) != sizeof(fcport->port_name));
802 memcpy(sess->port_name, fcport->port_name, sizeof(sess->port_name)); 801 memcpy(sess->port_name, fcport->port_name, sizeof(sess->port_name));
803 802
@@ -869,10 +868,8 @@ void qlt_fc_port_added(struct scsi_qla_host *vha, fc_port_t *fcport)
869 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf007, 868 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf007,
870 "Reappeared sess %p\n", sess); 869 "Reappeared sess %p\n", sess);
871 } 870 }
872 sess->s_id = fcport->d_id; 871 ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, fcport->loop_id,
873 sess->loop_id = fcport->loop_id; 872 (fcport->flags & FCF_CONF_COMP_SUPPORTED));
874 sess->conf_compl_supported = !!(fcport->flags &
875 FCF_CONF_COMP_SUPPORTED);
876 } 873 }
877 874
878 if (sess && sess->local) { 875 if (sess && sess->local) {