scsi: qla2xxx: Use FC generic update firmware options routine for ISP27xx

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

Link: https://lore.kernel.org/r/20200226224022.24518-4-hmadhani@marvell.com
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Giridhar Malavali 2020-02-26 14:40:07 -08:00 коммит произвёл Martin K. Petersen
Родитель 9ef4847a80
Коммит 37efd51f75
3 изменённых файлов: 2 добавлений и 70 удалений

Просмотреть файл

@ -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 *);

Просмотреть файл

@ -8679,72 +8679,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.

Просмотреть файл

@ -2308,7 +2308,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,
@ -2425,7 +2425,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,