All of lore.kernel.org
 help / color / mirror / Atom feed
From: Himanshu Madhani <hmadhani@marvell.com>
To: <James.Bottomley@HansenPartnership.com>, <martin.petersen@oracle.com>
Cc: <hmadhani@marvell.com>, <linux-scsi@vger.kernel.org>
Subject: [PATCH 03/18] qla2xxx: Use FC generic update firmware options routine for ISP27xx
Date: Wed, 26 Feb 2020 14:40:07 -0800	[thread overview]
Message-ID: <20200226224022.24518-4-hmadhani@marvell.com> (raw)
In-Reply-To: <20200226224022.24518-1-hmadhani@marvell.com>

From: Giridhar Malavali <gmalavali@marvell.com>

This patch uses generic firmware update options for FCoE based
adapters as well to reduce code duplication.

Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
---
 drivers/scsi/qla2xxx/qla_gbl.h  |  2 --
 drivers/scsi/qla2xxx/qla_init.c | 66 -----------------------------------------
 drivers/scsi/qla2xxx/qla_os.c   |  4 +--
 3 files changed, 2 insertions(+), 70 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index bb3dfef9afb8..73b663defee1 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -31,8 +31,6 @@ extern int qla24xx_nvram_config(struct scsi_qla_host *);
 extern int qla81xx_nvram_config(struct scsi_qla_host *);
 extern void qla2x00_update_fw_options(struct scsi_qla_host *);
 extern void qla24xx_update_fw_options(scsi_qla_host_t *);
-extern void qla81xx_update_fw_options(scsi_qla_host_t *);
-extern void qla83xx_update_fw_options(scsi_qla_host_t *);
 
 extern int qla2x00_load_risc(struct scsi_qla_host *, uint32_t *);
 extern int qla24xx_load_risc(scsi_qla_host_t *, uint32_t *);
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 111a97a69489..50a173086118 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -8680,72 +8680,6 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
 	return status;
 }
 
-void
-qla83xx_update_fw_options(scsi_qla_host_t *vha)
-{
-	struct qla_hw_data *ha = vha->hw;
-
-	if (ql2xrdpenable)
-		ha->fw_options[1] |= ADD_FO1_ENABLE_PUREX_IOCB;
-
-	qla2x00_set_fw_options(vha, ha->fw_options);
-}
-
-void
-qla81xx_update_fw_options(scsi_qla_host_t *vha)
-{
-	struct qla_hw_data *ha = vha->hw;
-
-	/*  Hold status IOCBs until ABTS response received. */
-	if (ql2xfwholdabts)
-		ha->fw_options[3] |= BIT_12;
-
-	/* Set Retry FLOGI in case of P2P connection */
-	if (ha->operating_mode == P2P) {
-		ha->fw_options[2] |= BIT_3;
-		ql_dbg(ql_dbg_disc, vha, 0x2103,
-		    "(%s): Setting FLOGI retry BIT in fw_options[2]: 0x%x\n",
-			__func__, ha->fw_options[2]);
-	}
-
-	/* Move PUREX, ABTS RX & RIDA to ATIOQ */
-	if (ql2xmvasynctoatio) {
-		if (qla_tgt_mode_enabled(vha) ||
-		    qla_dual_mode_enabled(vha))
-			ha->fw_options[2] |= BIT_11;
-		else
-			ha->fw_options[2] &= ~BIT_11;
-	}
-
-	if (qla_tgt_mode_enabled(vha) ||
-	    qla_dual_mode_enabled(vha)) {
-		/* FW auto send SCSI status during */
-		ha->fw_options[1] |= BIT_8;
-		ha->fw_options[10] |= (u16)SAM_STAT_BUSY << 8;
-
-		/* FW perform Exchange validation */
-		ha->fw_options[2] |= BIT_4;
-	} else {
-		ha->fw_options[1]  &= ~BIT_8;
-		ha->fw_options[10] &= 0x00ff;
-
-		ha->fw_options[2] &= ~BIT_4;
-	}
-
-	if (ql2xetsenable) {
-		/* Enable ETS Burst. */
-		memset(ha->fw_options, 0, sizeof(ha->fw_options));
-		ha->fw_options[2] |= BIT_9;
-	}
-
-	ql_dbg(ql_dbg_init, vha, 0x00e9,
-	    "%s, add FW options 1-3 = 0x%04x 0x%04x 0x%04x mode %x\n",
-	    __func__, ha->fw_options[1], ha->fw_options[2],
-	    ha->fw_options[3], vha->host->active_mode);
-
-	qla2x00_set_fw_options(vha, ha->fw_options);
-}
-
 /*
  * qla24xx_get_fcp_prio
  *	Gets the fcp cmd priority value for the logged in port.
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 628bb4e87f17..f3244c8f2179 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2307,7 +2307,7 @@ static struct isp_operations qla81xx_isp_ops = {
 	.config_rings		= qla24xx_config_rings,
 	.reset_adapter		= qla24xx_reset_adapter,
 	.nvram_config		= qla81xx_nvram_config,
-	.update_fw_options	= qla83xx_update_fw_options,
+	.update_fw_options	= qla24xx_update_fw_options,
 	.load_risc		= qla81xx_load_risc,
 	.pci_info_str		= qla24xx_pci_info_str,
 	.fw_version_str		= qla24xx_fw_version_str,
@@ -2424,7 +2424,7 @@ static struct isp_operations qla83xx_isp_ops = {
 	.config_rings		= qla24xx_config_rings,
 	.reset_adapter		= qla24xx_reset_adapter,
 	.nvram_config		= qla81xx_nvram_config,
-	.update_fw_options	= qla83xx_update_fw_options,
+	.update_fw_options	= qla24xx_update_fw_options,
 	.load_risc		= qla81xx_load_risc,
 	.pci_info_str		= qla24xx_pci_info_str,
 	.fw_version_str		= qla24xx_fw_version_str,
-- 
2.12.0


  parent reply	other threads:[~2020-02-26 22:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 22:40 [PATCH 00/18] qla2xxx: fixes for the driver Himanshu Madhani
2020-02-26 22:40 ` [PATCH 01/18] qla2xxX: Add 16.0GT for PCI String Himanshu Madhani
2020-02-26 22:40 ` [PATCH 02/18] qla2xxx: Avoid setting firmware options twice in 24xx_update_fw_options Himanshu Madhani
2020-02-26 22:40 ` Himanshu Madhani [this message]
2020-02-26 22:40 ` [PATCH 04/18] qla2xxx: Fix FCP-SCSI FC4 flag passing error Himanshu Madhani
2020-02-26 22:40 ` [PATCH 05/18] qla2xxx: Improved secure flash support messages Himanshu Madhani
2020-02-26 22:40 ` [PATCH 06/18] qla2xxx: Return appropriate failure through BSG Interface Himanshu Madhani
2020-02-26 22:40 ` [PATCH 07/18] qla2xxx: Use a dedicated interrupt handler for 'handshake-required' ISPs Himanshu Madhani
2020-02-26 22:40 ` [PATCH 08/18] qla2xxx: fix FW resource count values Himanshu Madhani
2020-02-26 22:40 ` [PATCH 09/18] qla2xxx: Update BPM enablement semantics Himanshu Madhani
2020-02-26 22:40 ` [PATCH 10/18] qla2xxx: add more FW debug information Himanshu Madhani
2020-02-26 22:40 ` [PATCH 11/18] qla2xxx: Force semaphore on flash validation failure Himanshu Madhani
2020-02-26 22:40 ` [PATCH 12/18] qla2xxx: Fix RDP respond data format Himanshu Madhani
2020-02-26 22:40 ` [PATCH 13/18] qla2xxx: Fix NPIV instantiation after FW dump Himanshu Madhani
2020-02-26 22:40 ` [PATCH 14/18] qla2xxx: Serialize fc_port alloc in N2N Himanshu Madhani
2020-02-26 22:40 ` [PATCH 15/18] qla2xxx: Remove restriction of FC T10-PI and FC-NVMe Himanshu Madhani
2020-02-26 22:40 ` [PATCH 16/18] qla2xxx: Handle NVME status iocb correctly Himanshu Madhani
2020-02-26 22:40 ` [PATCH 17/18] qla2xxx: Set Nport ID for N2N Himanshu Madhani
2020-02-26 22:40 ` [PATCH 18/18] qla2xxx: Update driver version to 10.01.00.25-k Himanshu Madhani
2020-02-29  1:33 ` [PATCH 00/18] qla2xxx: fixes for the driver Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200226224022.24518-4-hmadhani@marvell.com \
    --to=hmadhani@marvell.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.