summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHimanshu Madhani <himanshu.madhani@cavium.com>2017-01-20 07:28:02 +0100
committerNicholas Bellinger <nab@linux-iscsi.org>2017-02-09 09:39:02 +0100
commit0ca55938497412f9ffdbcb5cb7c4f8d6d28356ee (patch)
treef3dc238194dcbcf31d3f203cef9f481cb3f4d586
parentqla2xxx: Add Dual mode support in the driver (diff)
downloadlinux-0ca55938497412f9ffdbcb5cb7c4f8d6d28356ee.tar.xz
linux-0ca55938497412f9ffdbcb5cb7c4f8d6d28356ee.zip
qla2xxx: Remove unused reverse_ini_mode
With support for dual mode in the driver, this mode becomes dead code. Remove reverse_ini_mode from code. Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h1
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c10
-rw-r--r--drivers/scsi/qla2xxx/qla_target.h8
3 files changed, 0 insertions, 19 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index f67a1c82502c..4ff30d136924 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -3237,7 +3237,6 @@ struct qlt_hw_data {
/* Protected by hw lock */
uint32_t enable_class_2:1;
uint32_t enable_explicit_conf:1;
- uint32_t ini_mode_force_reverse:1;
uint32_t node_name_set:1;
dma_addr_t atio_dma; /* Physical address. */
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index c8f312f8e0ff..6571869c676a 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -5858,8 +5858,6 @@ EXPORT_SYMBOL(qlt_lport_deregister);
/* Must be called under HW lock */
static void qlt_set_mode(struct scsi_qla_host *vha)
{
- struct qla_hw_data *ha = vha->hw;
-
switch (ql2x_ini_mode) {
case QLA2XXX_INI_MODE_DISABLED:
case QLA2XXX_INI_MODE_EXCLUSIVE:
@@ -5874,16 +5872,11 @@ static void qlt_set_mode(struct scsi_qla_host *vha)
default:
break;
}
-
- if (ha->tgt.ini_mode_force_reverse)
- qla_reverse_ini_mode(vha);
}
/* Must be called under HW lock */
static void qlt_clear_mode(struct scsi_qla_host *vha)
{
- struct qla_hw_data *ha = vha->hw;
-
switch (ql2x_ini_mode) {
case QLA2XXX_INI_MODE_DISABLED:
vha->host->active_mode = MODE_UNKNOWN;
@@ -5898,9 +5891,6 @@ static void qlt_clear_mode(struct scsi_qla_host *vha)
default:
break;
}
-
- if (ha->tgt.ini_mode_force_reverse)
- qla_reverse_ini_mode(vha);
}
/*
diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
index ac86b379a269..a7f90dcaae37 100644
--- a/drivers/scsi/qla2xxx/qla_target.h
+++ b/drivers/scsi/qla2xxx/qla_target.h
@@ -995,14 +995,6 @@ static inline bool qla_dual_mode_enabled(struct scsi_qla_host *ha)
return (ha->host->active_mode == MODE_DUAL);
}
-static inline void qla_reverse_ini_mode(struct scsi_qla_host *ha)
-{
- if (ha->host->active_mode & MODE_INITIATOR)
- ha->host->active_mode &= ~MODE_INITIATOR;
- else
- ha->host->active_mode |= MODE_INITIATOR;
-}
-
static inline uint32_t sid_to_key(const uint8_t *s_id)
{
uint32_t key;