scsi: Revert "scsi: qla2xxx: Fix disk failure to rediscover"
[linux-2.6-microblaze.git] / drivers / scsi / qla2xxx / qla_init.c
index 41ffad6..e9bc933 100644 (file)
@@ -5789,8 +5789,6 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)
        if (atomic_read(&fcport->state) == FCS_ONLINE)
                return;
 
-       qla2x00_set_fcport_state(fcport, FCS_ONLINE);
-
        rport_ids.node_name = wwn_to_u64(fcport->node_name);
        rport_ids.port_name = wwn_to_u64(fcport->port_name);
        rport_ids.port_id = fcport->d_id.b.domain << 16 |
@@ -5891,7 +5889,6 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
                qla2x00_reg_remote_port(vha, fcport);
                break;
        case MODE_TARGET:
-               qla2x00_set_fcport_state(fcport, FCS_ONLINE);
                if (!vha->vha_tgt.qla_tgt->tgt_stop &&
                        !vha->vha_tgt.qla_tgt->tgt_stopped)
                        qlt_fc_port_added(vha, fcport);
@@ -5909,6 +5906,8 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
        if (NVME_TARGET(vha->hw, fcport))
                qla_nvme_register_remote(vha, fcport);
 
+       qla2x00_set_fcport_state(fcport, FCS_ONLINE);
+
        if (IS_IIDMA_CAPABLE(vha->hw) && vha->hw->flags.gpsc_supported) {
                if (fcport->id_changed) {
                        fcport->id_changed = 0;