|
|
|
|
@@ -16,14 +16,14 @@ qla2x00_bsg_job_done(void *data, void *ptr, int res)
|
|
|
|
|
{
|
|
|
|
|
srb_t *sp = (srb_t*)ptr;
|
|
|
|
|
struct scsi_qla_host *vha = (scsi_qla_host_t *)data;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct fc_bsg_job *bsg_job = sp->u.bsg_job;
|
|
|
|
|
#else
|
|
|
|
|
struct bsg_job *bsg_job = sp->u.bsg_job;
|
|
|
|
|
struct fc_bsg_reply *bsg_reply = bsg_job->reply;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = res;
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
@@ -39,7 +39,7 @@ qla2x00_bsg_sp_free(void *data, void *ptr)
|
|
|
|
|
{
|
|
|
|
|
srb_t *sp = (srb_t*)ptr;
|
|
|
|
|
struct scsi_qla_host *vha = (scsi_qla_host_t *)data;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct fc_bsg_job *bsg_job = sp->u.bsg_job;
|
|
|
|
|
#else
|
|
|
|
|
struct bsg_job *bsg_job = sp->u.bsg_job;
|
|
|
|
|
@@ -114,13 +114,13 @@ qla24xx_fcp_prio_cfg_valid(scsi_qla_host_t *vha,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla24xx_proc_fcp_prio_cfg_cmd(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct Scsi_Host *host = fc_bsg_to_shost(bsg_job);
|
|
|
|
|
@@ -139,7 +139,7 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Get the sub command */
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
oper = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1];
|
|
|
|
|
#else
|
|
|
|
|
oper = bsg_request->rqst_data.h_vendor.vendor_cmd[1];
|
|
|
|
|
@@ -157,14 +157,14 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
ha->fcp_prio_cfg->attributes &=
|
|
|
|
|
~FCP_PRIO_ATTR_ENABLE;
|
|
|
|
|
qla24xx_update_all_fcp_prio(vha);
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = DID_OK;
|
|
|
|
|
#endif
|
|
|
|
|
} else {
|
|
|
|
|
ret = -EINVAL;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -180,14 +180,14 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
ha->fcp_prio_cfg->attributes |=
|
|
|
|
|
FCP_PRIO_ATTR_ENABLE;
|
|
|
|
|
qla24xx_update_all_fcp_prio(vha);
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = DID_OK;
|
|
|
|
|
#endif
|
|
|
|
|
} else {
|
|
|
|
|
ret = -EINVAL;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -201,7 +201,7 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
len = bsg_job->reply_payload.payload_len;
|
|
|
|
|
if (!len || len > FCP_PRIO_CFG_SIZE) {
|
|
|
|
|
ret = -EINVAL;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -209,7 +209,7 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
goto exit_fcp_prio_cfg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK;
|
|
|
|
|
bsg_job->reply->reply_payload_rcv_len =
|
|
|
|
|
#else
|
|
|
|
|
@@ -226,7 +226,7 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
case QLFC_FCP_PRIO_SET_CONFIG:
|
|
|
|
|
len = bsg_job->request_payload.payload_len;
|
|
|
|
|
if (!len || len > FCP_PRIO_CFG_SIZE) {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -241,7 +241,7 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
ql_log(ql_log_warn, vha, 0x7050,
|
|
|
|
|
"Unable to allocate memory for fcp prio "
|
|
|
|
|
"config data (%x).\n", FCP_PRIO_CFG_SIZE);
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -260,7 +260,7 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
|
|
|
|
|
if (!qla24xx_fcp_prio_cfg_valid(vha,
|
|
|
|
|
(struct qla_fcp_prio_cfg *) ha->fcp_prio_cfg, 1)) {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -278,7 +278,7 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
if (ha->fcp_prio_cfg->attributes & FCP_PRIO_ATTR_ENABLE)
|
|
|
|
|
ha->flags.fcp_prio_enabled = 1;
|
|
|
|
|
qla24xx_update_all_fcp_prio(vha);
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = DID_OK;
|
|
|
|
|
@@ -289,7 +289,7 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
exit_fcp_prio_cfg:
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
if (!ret)
|
|
|
|
|
@@ -300,13 +300,13 @@ exit_fcp_prio_cfg:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla2x00_process_els(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla2x00_process_els(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct fc_bsg_request *bsg_request = bsg_job->request;
|
|
|
|
|
#endif
|
|
|
|
|
struct fc_rport *rport;
|
|
|
|
|
@@ -321,7 +321,7 @@ qla2x00_process_els(struct bsg_job *bsg_job)
|
|
|
|
|
uint16_t nextlid = 0;
|
|
|
|
|
|
|
|
|
|
#ifdef __COVERITY__
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
BUG_ON(bsg_job->request->msgcode != FC_BSG_RPT_ELS &&
|
|
|
|
|
bsg_job->request->msgcode != FC_BSG_HST_ELS_NOLOGIN);
|
|
|
|
|
#else
|
|
|
|
|
@@ -330,7 +330,7 @@ qla2x00_process_els(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
if (bsg_job->request->msgcode == FC_BSG_RPT_ELS) {
|
|
|
|
|
rport = bsg_job->rport;
|
|
|
|
|
#else
|
|
|
|
|
@@ -343,7 +343,7 @@ qla2x00_process_els(struct bsg_job *bsg_job)
|
|
|
|
|
ha = vha->hw;
|
|
|
|
|
type = "FC_BSG_RPT_ELS";
|
|
|
|
|
} else {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
host = fc_bsg_to_shost(bsg_job);
|
|
|
|
|
@@ -374,7 +374,7 @@ qla2x00_process_els(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ELS request for rport */
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
if (bsg_job->request->msgcode == FC_BSG_RPT_ELS) {
|
|
|
|
|
#else
|
|
|
|
|
if (bsg_request->msgcode == FC_BSG_RPT_ELS) {
|
|
|
|
|
@@ -403,7 +403,7 @@ qla2x00_process_els(struct bsg_job *bsg_job)
|
|
|
|
|
|
|
|
|
|
/* Initialize all required fields of fcport */
|
|
|
|
|
fcport->vha = vha;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
fcport->d_id.b.al_pa =
|
|
|
|
|
bsg_job->request->rqst_data.h_els.port_id[0];
|
|
|
|
|
fcport->d_id.b.area =
|
|
|
|
|
@@ -462,7 +462,7 @@ qla2x00_process_els(struct bsg_job *bsg_job)
|
|
|
|
|
goto done_unmap_sg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
sp->type =
|
|
|
|
|
(bsg_job->request->msgcode == FC_BSG_RPT_ELS ?
|
|
|
|
|
SRB_ELS_CMD_RPT : SRB_ELS_CMD_HST);
|
|
|
|
|
@@ -484,7 +484,7 @@ qla2x00_process_els(struct bsg_job *bsg_job)
|
|
|
|
|
ql_dbg(ql_dbg_user, vha, 0x700a,
|
|
|
|
|
"bsg rqst type: %s els type: %x - loop-id=%x "
|
|
|
|
|
"portid=%-2x%02x%02x.\n", type,
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->request->rqst_data.h_els.command_code, fcport->loop_id,
|
|
|
|
|
#else
|
|
|
|
|
bsg_request->rqst_data.h_els.command_code, fcport->loop_id,
|
|
|
|
|
@@ -509,7 +509,7 @@ done_unmap_sg:
|
|
|
|
|
goto done_free_fcport;
|
|
|
|
|
|
|
|
|
|
done_free_fcport:
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
if (bsg_job->request->msgcode == FC_BSG_HST_ELS_NOLOGIN)
|
|
|
|
|
#else
|
|
|
|
|
if (bsg_request->msgcode == FC_BSG_HST_ELS_NOLOGIN)
|
|
|
|
|
@@ -534,14 +534,14 @@ qla24xx_calc_ct_iocbs(uint16_t dsds)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla2x00_process_ct(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla2x00_process_ct(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
srb_t *sp;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_request *bsg_request = bsg_job->request;
|
|
|
|
|
@@ -592,7 +592,7 @@ qla2x00_process_ct(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
loop_id =
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
(bsg_job->request->rqst_data.h_ct.preamble_word1 & 0xFF000000)
|
|
|
|
|
#else
|
|
|
|
|
(bsg_request->rqst_data.h_ct.preamble_word1 & 0xFF000000)
|
|
|
|
|
@@ -627,7 +627,7 @@ qla2x00_process_ct(struct bsg_job *bsg_job)
|
|
|
|
|
|
|
|
|
|
/* Initialize all required fields of fcport */
|
|
|
|
|
fcport->vha = vha;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
fcport->d_id.b.al_pa = bsg_job->request->rqst_data.h_ct.port_id[0];
|
|
|
|
|
fcport->d_id.b.area = bsg_job->request->rqst_data.h_ct.port_id[1];
|
|
|
|
|
fcport->d_id.b.domain = bsg_job->request->rqst_data.h_ct.port_id[2];
|
|
|
|
|
@@ -657,7 +657,7 @@ qla2x00_process_ct(struct bsg_job *bsg_job)
|
|
|
|
|
ql_dbg(ql_dbg_user, vha, 0x7016,
|
|
|
|
|
"bsg rqst type: %s else type: %x - "
|
|
|
|
|
"loop-id=%x portid=%02x%02x%02x.\n", type,
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
(bsg_job->request->rqst_data.h_ct.preamble_word2 >> 16),
|
|
|
|
|
#else
|
|
|
|
|
(bsg_request->rqst_data.h_ct.preamble_word2 >> 16),
|
|
|
|
|
@@ -777,13 +777,13 @@ done_reset_internal:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla2x00_process_loopback(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla2x00_process_loopback(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_request *bsg_request = bsg_job->request;
|
|
|
|
|
@@ -871,7 +871,7 @@ qla2x00_process_loopback(struct bsg_job *bsg_job)
|
|
|
|
|
elreq.rcv_dma = rsp_data_dma;
|
|
|
|
|
elreq.transfer_size = req_data_len;
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
elreq.options = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1];
|
|
|
|
|
#else
|
|
|
|
|
elreq.options = bsg_request->rqst_data.h_vendor.vendor_cmd[1];
|
|
|
|
|
@@ -894,7 +894,7 @@ qla2x00_process_loopback(struct bsg_job *bsg_job)
|
|
|
|
|
if (qla81xx_get_port_config(vha, config)) {
|
|
|
|
|
ql_log(ql_log_warn, vha, 0x701f,
|
|
|
|
|
"Get port config failed.\n");
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -911,7 +911,7 @@ qla2x00_process_loopback(struct bsg_job *bsg_job)
|
|
|
|
|
new_config)) {
|
|
|
|
|
ql_log(ql_log_warn, vha, 0x7024,
|
|
|
|
|
"Internal loopback failed.\n");
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result =
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result =
|
|
|
|
|
@@ -926,7 +926,7 @@ qla2x00_process_loopback(struct bsg_job *bsg_job)
|
|
|
|
|
*/
|
|
|
|
|
if (qla81xx_reset_internal_loopback(vha,
|
|
|
|
|
config, 1)) {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result =
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result =
|
|
|
|
|
@@ -966,7 +966,7 @@ qla2x00_process_loopback(struct bsg_job *bsg_job)
|
|
|
|
|
"MPI reset failed.\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -994,7 +994,7 @@ qla2x00_process_loopback(struct bsg_job *bsg_job)
|
|
|
|
|
fw_sts_ptr += sizeof(response);
|
|
|
|
|
*fw_sts_ptr = command_sent;
|
|
|
|
|
rval = 0;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -1005,7 +1005,7 @@ qla2x00_process_loopback(struct bsg_job *bsg_job)
|
|
|
|
|
|
|
|
|
|
bsg_job->reply_len = sizeof(struct fc_bsg_reply) +
|
|
|
|
|
sizeof(response) + sizeof(uint8_t);
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_payload_rcv_len =
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->reply_payload_rcv_len =
|
|
|
|
|
@@ -1016,7 +1016,7 @@ qla2x00_process_loopback(struct bsg_job *bsg_job)
|
|
|
|
|
memcpy(fw_sts_ptr, response, sizeof(response));
|
|
|
|
|
fw_sts_ptr += sizeof(response);
|
|
|
|
|
*fw_sts_ptr = command_sent;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = DID_OK;
|
|
|
|
|
@@ -1025,7 +1025,7 @@ qla2x00_process_loopback(struct bsg_job *bsg_job)
|
|
|
|
|
bsg_job->reply_payload.sg_cnt, rsp_data,
|
|
|
|
|
rsp_data_len);
|
|
|
|
|
}
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
if (!rval)
|
|
|
|
|
@@ -1050,13 +1050,13 @@ done_unmap_req_sg:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla84xx_reset(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla84xx_reset(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_request *bsg_request = bsg_job->request;
|
|
|
|
|
@@ -1073,7 +1073,7 @@ qla84xx_reset(struct bsg_job *bsg_job)
|
|
|
|
|
return -EINVAL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
flag = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1];
|
|
|
|
|
#else
|
|
|
|
|
flag = bsg_request->rqst_data.h_vendor.vendor_cmd[1];
|
|
|
|
|
@@ -1085,7 +1085,7 @@ qla84xx_reset(struct bsg_job *bsg_job)
|
|
|
|
|
ql_log(ql_log_warn, vha, 0x7030,
|
|
|
|
|
"Vendor request 84xx reset failed.\n");
|
|
|
|
|
rval = 0;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -1093,14 +1093,14 @@ qla84xx_reset(struct bsg_job *bsg_job)
|
|
|
|
|
} else {
|
|
|
|
|
ql_dbg(ql_dbg_user, vha, 0x7031,
|
|
|
|
|
"Vendor request 84xx reset completed.\n");
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = DID_OK;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
if (!rval)
|
|
|
|
|
@@ -1111,13 +1111,13 @@ qla84xx_reset(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla84xx_updatefw(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla84xx_updatefw(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_request *bsg_request = bsg_job->request;
|
|
|
|
|
@@ -1180,7 +1180,7 @@ qla84xx_updatefw(struct bsg_job *bsg_job)
|
|
|
|
|
goto done_free_fw_buf;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
flag = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1];
|
|
|
|
|
#else
|
|
|
|
|
flag = bsg_request->rqst_data.h_vendor.vendor_cmd[1];
|
|
|
|
|
@@ -1211,7 +1211,7 @@ qla84xx_updatefw(struct bsg_job *bsg_job)
|
|
|
|
|
"Vendor request 84xx updatefw failed.\n");
|
|
|
|
|
|
|
|
|
|
rval = 0;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -1221,14 +1221,14 @@ qla84xx_updatefw(struct bsg_job *bsg_job)
|
|
|
|
|
"Vendor request 84xx updatefw completed.\n");
|
|
|
|
|
|
|
|
|
|
bsg_job->reply_len = sizeof(struct fc_bsg_reply);
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = DID_OK;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
if (!rval)
|
|
|
|
|
@@ -1248,13 +1248,13 @@ done_unmap_sg:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla84xx_mgmt_cmd(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla84xx_mgmt_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_request *bsg_request = bsg_job->request;
|
|
|
|
|
@@ -1278,7 +1278,7 @@ qla84xx_mgmt_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
return -EINVAL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
ql84_mgmt = (struct qla_bsg_a84_mgmt *)((char *)bsg_job->request +
|
|
|
|
|
sizeof(struct fc_bsg_request));
|
|
|
|
|
#else
|
|
|
|
|
@@ -1421,7 +1421,7 @@ qla84xx_mgmt_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
"Vendor request 84xx mgmt failed.\n");
|
|
|
|
|
|
|
|
|
|
rval = 0;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -1431,7 +1431,7 @@ qla84xx_mgmt_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
"Vendor request 84xx mgmt completed.\n");
|
|
|
|
|
|
|
|
|
|
bsg_job->reply_len = sizeof(struct fc_bsg_reply);
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = DID_OK;
|
|
|
|
|
@@ -1439,7 +1439,7 @@ qla84xx_mgmt_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
|
|
|
|
|
if ((ql84_mgmt->mgmt.cmd == QLA84_MGMT_READ_MEM) ||
|
|
|
|
|
(ql84_mgmt->mgmt.cmd == QLA84_MGMT_GET_INFO)) {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_payload_rcv_len =
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->reply_payload_rcv_len =
|
|
|
|
|
@@ -1452,7 +1452,7 @@ qla84xx_mgmt_cmd(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
if (!rval)
|
|
|
|
|
@@ -1478,13 +1478,13 @@ exit_mgmt:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla24xx_iidma(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla24xx_iidma(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_request *bsg_request = bsg_job->request;
|
|
|
|
|
@@ -1503,7 +1503,7 @@ qla24xx_iidma(struct bsg_job *bsg_job)
|
|
|
|
|
return -EINVAL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
port_param = (struct qla_port_param *)((char *)bsg_job->request +
|
|
|
|
|
sizeof(struct fc_bsg_request));
|
|
|
|
|
#else
|
|
|
|
|
@@ -1559,7 +1559,7 @@ qla24xx_iidma(struct bsg_job *bsg_job)
|
|
|
|
|
fcport->port_name[5], fcport->port_name[6],
|
|
|
|
|
fcport->port_name[7], rval, fcport->fp_speed, mb[0], mb[1]);
|
|
|
|
|
rval = 0;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = (DID_ERROR << 16);
|
|
|
|
|
@@ -1576,14 +1576,14 @@ qla24xx_iidma(struct bsg_job *bsg_job)
|
|
|
|
|
sizeof(struct qla_port_param));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = DID_OK;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
if (!rval)
|
|
|
|
|
@@ -1594,14 +1594,14 @@ qla24xx_iidma(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla2x00_optrom_setup(struct fc_bsg_job *bsg_job, scsi_qla_host_t *vha,
|
|
|
|
|
#else
|
|
|
|
|
qla2x00_optrom_setup(struct bsg_job *bsg_job, scsi_qla_host_t *vha,
|
|
|
|
|
#endif
|
|
|
|
|
uint8_t is_update)
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct fc_bsg_request *bsg_request = bsg_job->request;
|
|
|
|
|
#endif
|
|
|
|
|
uint32_t start = 0;
|
|
|
|
|
@@ -1611,7 +1611,7 @@ qla2x00_optrom_setup(struct bsg_job *bsg_job, scsi_qla_host_t *vha,
|
|
|
|
|
if (unlikely(pci_channel_offline(ha->pdev)))
|
|
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
start = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1];
|
|
|
|
|
#else
|
|
|
|
|
start = bsg_request->rqst_data.h_vendor.vendor_cmd[1];
|
|
|
|
|
@@ -1674,13 +1674,13 @@ qla2x00_optrom_setup(struct bsg_job *bsg_job, scsi_qla_host_t *vha,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla2x00_read_optrom(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla2x00_read_optrom(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_reply *bsg_reply = bsg_job->reply;
|
|
|
|
|
@@ -1704,7 +1704,7 @@ qla2x00_read_optrom(struct bsg_job *bsg_job)
|
|
|
|
|
bsg_job->reply_payload.sg_cnt, ha->optrom_buffer,
|
|
|
|
|
ha->optrom_region_size);
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_payload_rcv_len = ha->optrom_region_size;
|
|
|
|
|
bsg_job->reply->result = DID_OK;
|
|
|
|
|
#else
|
|
|
|
|
@@ -1714,7 +1714,7 @@ qla2x00_read_optrom(struct bsg_job *bsg_job)
|
|
|
|
|
vfree(ha->optrom_buffer);
|
|
|
|
|
ha->optrom_buffer = NULL;
|
|
|
|
|
ha->optrom_state = QLA_SWAITING;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
bsg_job_done(bsg_job, bsg_reply->result,
|
|
|
|
|
@@ -1724,13 +1724,13 @@ qla2x00_read_optrom(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla2x00_update_optrom(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla2x00_update_optrom(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_reply *bsg_reply = bsg_job->reply;
|
|
|
|
|
@@ -1754,7 +1754,7 @@ qla2x00_update_optrom(struct bsg_job *bsg_job)
|
|
|
|
|
ha->isp_ops->write_optrom(vha, ha->optrom_buffer,
|
|
|
|
|
ha->optrom_region_start, ha->optrom_region_size);
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = DID_OK;
|
|
|
|
|
@@ -1762,7 +1762,7 @@ qla2x00_update_optrom(struct bsg_job *bsg_job)
|
|
|
|
|
vfree(ha->optrom_buffer);
|
|
|
|
|
ha->optrom_buffer = NULL;
|
|
|
|
|
ha->optrom_state = QLA_SWAITING;
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
bsg_job_done(bsg_job, bsg_reply->result,
|
|
|
|
|
@@ -1772,13 +1772,13 @@ qla2x00_update_optrom(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla2x00_update_fru_versions(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla2x00_update_fru_versions(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_reply *bsg_reply = bsg_job->reply;
|
|
|
|
|
@@ -1794,7 +1794,7 @@ qla2x00_update_fru_versions(struct bsg_job *bsg_job)
|
|
|
|
|
dma_addr_t sfp_dma;
|
|
|
|
|
void *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma);
|
|
|
|
|
if (!sfp) {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
@@ -1814,7 +1814,7 @@ qla2x00_update_fru_versions(struct bsg_job *bsg_job)
|
|
|
|
|
image->field_address.device, image->field_address.offset,
|
|
|
|
|
sizeof(image->field_info), image->field_address.option);
|
|
|
|
|
if (rval) {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
@@ -1825,7 +1825,7 @@ qla2x00_update_fru_versions(struct bsg_job *bsg_job)
|
|
|
|
|
image++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] = 0;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->reply_data.vendor_reply.vendor_rsp[0] = 0;
|
|
|
|
|
@@ -1836,7 +1836,7 @@ dealloc:
|
|
|
|
|
|
|
|
|
|
done:
|
|
|
|
|
bsg_job->reply_len = sizeof(struct fc_bsg_reply);
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK << 16;
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
@@ -1849,13 +1849,13 @@ done:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla2x00_read_fru_status(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla2x00_read_fru_status(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_reply *bsg_reply = bsg_job->reply;
|
|
|
|
|
@@ -1869,7 +1869,7 @@ qla2x00_read_fru_status(struct bsg_job *bsg_job)
|
|
|
|
|
dma_addr_t sfp_dma;
|
|
|
|
|
uint8_t *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma);
|
|
|
|
|
if (!sfp) {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
@@ -1887,7 +1887,7 @@ qla2x00_read_fru_status(struct bsg_job *bsg_job)
|
|
|
|
|
sr->status_reg = *sfp;
|
|
|
|
|
|
|
|
|
|
if (rval) {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
@@ -1899,7 +1899,7 @@ qla2x00_read_fru_status(struct bsg_job *bsg_job)
|
|
|
|
|
sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
|
|
|
|
|
bsg_job->reply_payload.sg_cnt, sr, sizeof(*sr));
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] = 0;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->reply_data.vendor_reply.vendor_rsp[0] = 0;
|
|
|
|
|
@@ -1910,7 +1910,7 @@ dealloc:
|
|
|
|
|
|
|
|
|
|
done:
|
|
|
|
|
bsg_job->reply_len = sizeof(struct fc_bsg_reply);
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_payload_rcv_len = sizeof(*sr);
|
|
|
|
|
bsg_job->reply->result = DID_OK << 16;
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
@@ -1925,13 +1925,13 @@ done:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla2x00_write_fru_status(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla2x00_write_fru_status(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct Scsi_Host *host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_reply *bsg_reply = bsg_job->reply;
|
|
|
|
|
@@ -1945,7 +1945,7 @@ qla2x00_write_fru_status(struct bsg_job *bsg_job)
|
|
|
|
|
dma_addr_t sfp_dma;
|
|
|
|
|
uint8_t *sfp = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &sfp_dma);
|
|
|
|
|
if (!sfp) {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
@@ -1963,7 +1963,7 @@ qla2x00_write_fru_status(struct bsg_job *bsg_job)
|
|
|
|
|
sizeof(sr->status_reg), sr->field_address.option);
|
|
|
|
|
|
|
|
|
|
if (rval) {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->reply_data.vendor_reply.vendor_rsp[0] =
|
|
|
|
|
@@ -1972,7 +1972,7 @@ qla2x00_write_fru_status(struct bsg_job *bsg_job)
|
|
|
|
|
goto dealloc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_data.vendor_reply.vendor_rsp[0] = 0;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->reply_data.vendor_reply.vendor_rsp[0] = 0;
|
|
|
|
|
@@ -1983,7 +1983,7 @@ dealloc:
|
|
|
|
|
|
|
|
|
|
done:
|
|
|
|
|
bsg_job->reply_len = sizeof(struct fc_bsg_reply);
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = DID_OK << 16;
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
@@ -1996,18 +1996,18 @@ done:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla2x00_process_vendor_specific(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla2x00_process_vendor_specific(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct fc_bsg_request *bsg_request = bsg_job->request;
|
|
|
|
|
struct fc_bsg_reply *bsg_reply = bsg_job->reply;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
switch (bsg_job->request->rqst_data.h_vendor.vendor_cmd[0]) {
|
|
|
|
|
#else
|
|
|
|
|
switch (bsg_request->rqst_data.h_vendor.vendor_cmd[0]) {
|
|
|
|
|
@@ -2046,7 +2046,7 @@ qla2x00_process_vendor_specific(struct bsg_job *bsg_job)
|
|
|
|
|
return qla2x00_write_fru_status(bsg_job);
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
#else
|
|
|
|
|
@@ -2057,13 +2057,13 @@ qla2x00_process_vendor_specific(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla24xx_bsg_request(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla24xx_bsg_request(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
struct fc_bsg_request *bsg_request = bsg_job->request;
|
|
|
|
|
struct fc_bsg_reply *bsg_reply = bsg_job->reply;
|
|
|
|
|
#endif
|
|
|
|
|
@@ -2074,7 +2074,7 @@ qla24xx_bsg_request(struct bsg_job *bsg_job)
|
|
|
|
|
scsi_qla_host_t *vha;
|
|
|
|
|
|
|
|
|
|
/* In case no data transferred. */
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->reply_payload_rcv_len = 0;
|
|
|
|
|
|
|
|
|
|
if (bsg_job->request->msgcode == FC_BSG_RPT_ELS) {
|
|
|
|
|
@@ -2089,7 +2089,7 @@ qla24xx_bsg_request(struct bsg_job *bsg_job)
|
|
|
|
|
host = rport_to_shost(rport);
|
|
|
|
|
vha = shost_priv(host);
|
|
|
|
|
} else {
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
host = bsg_job->shost;
|
|
|
|
|
#else
|
|
|
|
|
host = fc_bsg_to_shost(bsg_job);
|
|
|
|
|
@@ -2100,7 +2100,7 @@ qla24xx_bsg_request(struct bsg_job *bsg_job)
|
|
|
|
|
if (qla2x00_reset_active(vha)) {
|
|
|
|
|
ql_dbg(ql_dbg_user, vha, 0x709f,
|
|
|
|
|
"BSG: ISP abort active/needed -- cmd=%d.\n",
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->request->msgcode);
|
|
|
|
|
bsg_job->reply->result = (DID_ERROR << 16);
|
|
|
|
|
bsg_job->job_done(bsg_job);
|
|
|
|
|
@@ -2112,13 +2112,13 @@ qla24xx_bsg_request(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ql_dbg(ql_dbg_user, vha, 0x7000,
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
"Entered %s msgcode=0x%x.\n", __func__, bsg_job->request->msgcode);
|
|
|
|
|
#else
|
|
|
|
|
"Entered %s msgcode=0x%x.\n", __func__, bsg_request->msgcode);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
switch (bsg_job->request->msgcode) {
|
|
|
|
|
#else
|
|
|
|
|
switch (bsg_request->msgcode) {
|
|
|
|
|
@@ -2138,7 +2138,7 @@ qla24xx_bsg_request(struct bsg_job *bsg_job)
|
|
|
|
|
case FC_BSG_RPT_CT:
|
|
|
|
|
default:
|
|
|
|
|
ql_log(ql_log_warn, vha, 0x705a, "Unsupported BSG request.\n");
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = ret;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = ret;
|
|
|
|
|
@@ -2149,13 +2149,13 @@ qla24xx_bsg_request(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
qla24xx_bsg_timeout(struct fc_bsg_job *bsg_job)
|
|
|
|
|
#else
|
|
|
|
|
qla24xx_bsg_timeout(struct bsg_job *bsg_job)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
scsi_qla_host_t *vha = shost_priv(bsg_job->shost);
|
|
|
|
|
#else
|
|
|
|
|
struct fc_bsg_request *bsg_request = bsg_job->request;
|
|
|
|
|
@@ -2187,7 +2187,7 @@ qla24xx_bsg_timeout(struct bsg_job *bsg_job)
|
|
|
|
|
"mbx abort_command "
|
|
|
|
|
"failed.\n");
|
|
|
|
|
bsg_job->req->errors =
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = -EIO;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = -EIO;
|
|
|
|
|
@@ -2197,7 +2197,7 @@ qla24xx_bsg_timeout(struct bsg_job *bsg_job)
|
|
|
|
|
"mbx abort_command "
|
|
|
|
|
"success.\n");
|
|
|
|
|
bsg_job->req->errors =
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->reply->result = 0;
|
|
|
|
|
#else
|
|
|
|
|
bsg_reply->result = 0;
|
|
|
|
|
@@ -2211,7 +2211,7 @@ qla24xx_bsg_timeout(struct bsg_job *bsg_job)
|
|
|
|
|
}
|
|
|
|
|
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
|
|
|
|
ql_log(ql_log_info, vha, 0x708b, "SRB not found to abort.\n");
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
bsg_job->req->errors = bsg_job->reply->result = -ENXIO;
|
|
|
|
|
#else
|
|
|
|
|
bsg_job->req->errors = bsg_reply->result = -ENXIO;
|
|
|
|
|
@@ -2220,7 +2220,7 @@ qla24xx_bsg_timeout(struct bsg_job *bsg_job)
|
|
|
|
|
|
|
|
|
|
done:
|
|
|
|
|
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
|
|
|
|
if (bsg_job->request->msgcode == FC_BSG_HST_CT)
|
|
|
|
|
#else
|
|
|
|
|
if (bsg_request->msgcode == FC_BSG_HST_CT)
|
|
|
|
|
|