diff options
author | Alexei Potashnik <alexei@purestorage.com> | 2015-07-14 16:00:47 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-07-24 17:19:41 -0400 |
commit | d20ed91bb60ca54c42e3326251287ec51ed225a1 (patch) | |
tree | dad0bd7842469cad33b0e0bd65e41a99d6584d8b | |
parent | df673274fa4896f25f0bf348d2a3535d74b4cbec (diff) |
qla2xxx: disable scsi_transport_fc registration in target mode
There are multiple reasons for disabling this:
1. It provides no functional benefit. We pretty much only get a few more
sysfs entries for each port, but all that information is already
available from /sys/kernel/debug/target/qla-session-X
2. It already only works in private-loop mode. By disabling we'll be
getting more uniform behavior with fabric mode.
3. It creates complications for the new PLOGI handling mechanism:
scsi_transport_fc port deletion timer could race with new session
from initiator and cause logout after successful login.
Cc: <stable@vger.kernel.org> # v3.18+
Signed-off-by: Alexei Potashnik <alexei@purestorage.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 14 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 3 |
2 files changed, 13 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 506621d814ab..11f2f3279eab 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -3340,8 +3340,7 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) | |||
3340 | 3340 | ||
3341 | if (IS_QLAFX00(vha->hw)) { | 3341 | if (IS_QLAFX00(vha->hw)) { |
3342 | qla2x00_set_fcport_state(fcport, FCS_ONLINE); | 3342 | qla2x00_set_fcport_state(fcport, FCS_ONLINE); |
3343 | qla2x00_reg_remote_port(vha, fcport); | 3343 | goto reg_port; |
3344 | return; | ||
3345 | } | 3344 | } |
3346 | fcport->login_retry = 0; | 3345 | fcport->login_retry = 0; |
3347 | fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); | 3346 | fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); |
@@ -3349,7 +3348,16 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) | |||
3349 | qla2x00_set_fcport_state(fcport, FCS_ONLINE); | 3348 | qla2x00_set_fcport_state(fcport, FCS_ONLINE); |
3350 | qla2x00_iidma_fcport(vha, fcport); | 3349 | qla2x00_iidma_fcport(vha, fcport); |
3351 | qla24xx_update_fcport_fcp_prio(vha, fcport); | 3350 | qla24xx_update_fcport_fcp_prio(vha, fcport); |
3352 | qla2x00_reg_remote_port(vha, fcport); | 3351 | |
3352 | reg_port: | ||
3353 | if (qla_ini_mode_enabled(vha)) | ||
3354 | qla2x00_reg_remote_port(vha, fcport); | ||
3355 | else { | ||
3356 | /* | ||
3357 | * Create target mode FC NEXUS in qla_target.c | ||
3358 | */ | ||
3359 | qlt_fc_port_added(vha, fcport); | ||
3360 | } | ||
3353 | } | 3361 | } |
3354 | 3362 | ||
3355 | /* | 3363 | /* |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index be6de2a1e36e..8a5cac8448c7 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -3235,7 +3235,8 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport, | |||
3235 | qla2xxx_wake_dpc(base_vha); | 3235 | qla2xxx_wake_dpc(base_vha); |
3236 | } else { | 3236 | } else { |
3237 | int now; | 3237 | int now; |
3238 | fc_remote_port_delete(rport); | 3238 | if (rport) |
3239 | fc_remote_port_delete(rport); | ||
3239 | qlt_do_generation_tick(vha, &now); | 3240 | qlt_do_generation_tick(vha, &now); |
3240 | qlt_fc_port_deleted(vha, fcport, now); | 3241 | qlt_fc_port_deleted(vha, fcport, now); |
3241 | } | 3242 | } |