Merge branch 'svn-trunk'

This commit is contained in:
Bart Van Assche
2019-06-02 19:59:09 -07:00
8 changed files with 26 additions and 43 deletions
+2 -2
View File
@@ -2743,8 +2743,8 @@ ql_dump_regs(uint level, scsi_qla_host_t *vha, uint id)
void
ql_dump_buffer(uint level, scsi_qla_host_t *vha, uint id,
const void *buf, uint size)
ql_dump_buffer(uint level, scsi_qla_host_t *vha, uint id, const void *buf,
uint size)
{
uint cnt;
+1 -1
View File
@@ -468,7 +468,7 @@ struct srb_iocb {
struct els_logo_payload *els_logo_pyld;
dma_addr_t els_logo_pyld_dma;
} els_logo;
struct {
struct els_plogi {
#define ELS_DCMD_PLOGI 0x3
uint32_t flags;
uint32_t els_cmd;
+2
View File
@@ -45,6 +45,8 @@ extern int qla2x00_local_device_login(scsi_qla_host_t *, fc_port_t *);
extern int qla24xx_els_dcmd_iocb(scsi_qla_host_t *, int, port_id_t);
extern int qla24xx_els_dcmd2_iocb(scsi_qla_host_t *, int, fc_port_t *, bool);
extern void qla2x00_els_dcmd2_free(scsi_qla_host_t *vha,
struct els_plogi *els_plogi);
extern void qla2x00_update_fcports(scsi_qla_host_t *);
+1 -11
View File
@@ -3141,17 +3141,7 @@ void qla24xx_sp_unmap(scsi_qla_host_t *vha, srb_t *sp)
switch (sp->type) {
case SRB_ELS_DCMD:
if (c->u.els_plogi.els_plogi_pyld)
dma_free_coherent(&vha->hw->pdev->dev,
c->u.els_plogi.tx_size,
c->u.els_plogi.els_plogi_pyld,
c->u.els_plogi.els_plogi_pyld_dma);
if (c->u.els_plogi.els_resp_pyld)
dma_free_coherent(&vha->hw->pdev->dev,
c->u.els_plogi.rx_size,
c->u.els_plogi.els_resp_pyld,
c->u.els_plogi.els_resp_pyld_dma);
qla2x00_els_dcmd2_free(vha, &c->u.els_plogi);
break;
case SRB_CT_PTHRU_CMD:
default:
+17 -23
View File
@@ -2764,6 +2764,21 @@ qla2x00_els_dcmd2_iocb_timeout(void *data)
sp->done(sp, QLA_FUNCTION_TIMEOUT);
}
void qla2x00_els_dcmd2_free(scsi_qla_host_t *vha, struct els_plogi *els_plogi)
{
if (els_plogi->els_plogi_pyld)
dma_free_coherent(&vha->hw->pdev->dev,
els_plogi->tx_size,
els_plogi->els_plogi_pyld,
els_plogi->els_plogi_pyld_dma);
if (els_plogi->els_resp_pyld)
dma_free_coherent(&vha->hw->pdev->dev,
els_plogi->rx_size,
els_plogi->els_resp_pyld,
els_plogi->els_resp_pyld_dma);
}
static void
qla2x00_els_dcmd2_sp_done(void *ptr, int res)
{
@@ -2798,17 +2813,7 @@ qla2x00_els_dcmd2_sp_done(void *ptr, int res)
if (!e) {
struct srb_iocb *elsio = &sp->u.iocb_cmd;
if (elsio->u.els_plogi.els_plogi_pyld)
dma_free_coherent(&sp->vha->hw->pdev->dev,
elsio->u.els_plogi.tx_size,
elsio->u.els_plogi.els_plogi_pyld,
elsio->u.els_plogi.els_plogi_pyld_dma);
if (elsio->u.els_plogi.els_resp_pyld)
dma_free_coherent(&sp->vha->hw->pdev->dev,
elsio->u.els_plogi.rx_size,
elsio->u.els_plogi.els_resp_pyld,
elsio->u.els_plogi.els_resp_pyld_dma);
qla2x00_els_dcmd2_free(vha, &elsio->u.els_plogi);
sp->free(sp);
return;
}
@@ -2908,18 +2913,7 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *vha, int els_opcode,
out:
fcport->flags &= ~(FCF_ASYNC_SENT);
if (elsio->u.els_plogi.els_plogi_pyld)
dma_free_coherent(&sp->vha->hw->pdev->dev,
elsio->u.els_plogi.tx_size,
elsio->u.els_plogi.els_plogi_pyld,
elsio->u.els_plogi.els_plogi_pyld_dma);
if (elsio->u.els_plogi.els_resp_pyld)
dma_free_coherent(&sp->vha->hw->pdev->dev,
elsio->u.els_plogi.rx_size,
elsio->u.els_plogi.els_resp_pyld,
elsio->u.els_plogi.els_resp_pyld_dma);
qla2x00_els_dcmd2_free(vha, &elsio->u.els_plogi);
sp->free(sp);
done:
return rval;
-2
View File
@@ -7,8 +7,6 @@
#ifndef __QLA_NX_H
#define __QLA_NX_H
#include <linux/version.h>
#include <linux/types.h>
#include <scsi/scsi.h>
/*
+2 -2
View File
@@ -252,7 +252,7 @@ MODULE_PARM_DESC(ql2xmdenable,
"0 - MiniDump disabled. "
"1 (Default) - MiniDump enabled.");
int ql2xexlogins = 0;
int ql2xexlogins;
module_param(ql2xexlogins, uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(ql2xexlogins,
"Number of extended Logins. "
@@ -268,7 +268,7 @@ module_param(ql2xiniexchg, uint, 0644);
MODULE_PARM_DESC(ql2xiniexchg,
"Number of initiator exchanges.");
int ql2xfwholdabts = 0;
int ql2xfwholdabts;
module_param(ql2xfwholdabts, int, S_IRUGO);
MODULE_PARM_DESC(ql2xfwholdabts,
"Allow FW to hold status IOCB until ABTS rsp received. "
+1 -2
View File
@@ -4127,7 +4127,6 @@ static inline int qlt_get_fcp_task_attr(struct scsi_qla_host *vha,
return fcp_task_attr;
}
static struct fc_port *qlt_make_local_sess(struct scsi_qla_host *, be_id_t);
/*
* Process context for I/O path into tcm_qla2xxx code
*/
@@ -5793,7 +5792,7 @@ static void qlt_handle_abts_completion(struct scsi_qla_host *vha,
entry->error_subcode2);
ha->tgt.tgt_ops->free_mcmd(mcmd);
}
} else {
} else if (mcmd) {
ha->tgt.tgt_ops->free_mcmd(mcmd);
}
}