From: <vl...@us...> - 2017-05-23 02:23:41
|
Revision: 7193 http://sourceforge.net/p/scst/svn/7193 Author: vlnb Date: 2017-05-23 02:23:38 +0000 (Tue, 23 May 2017) Log Message: ----------- qla2x00t: fix broken 4.9 kernels build Reported-By: Marc Smith <mar...@pa...> Modified Paths: -------------- trunk/qla2x00t/qla_bsg.c trunk/qla2x00t/qla_def.h trunk/qla2x00t/qla_gbl.h trunk/qla2x00t/qla_iocb.c trunk/qla2x00t/qla_isr.c Modified: trunk/qla2x00t/qla_bsg.c =================================================================== --- trunk/qla2x00t/qla_bsg.c 2017-05-20 03:29:41 UTC (rev 7192) +++ trunk/qla2x00t/qla_bsg.c 2017-05-23 02:23:38 UTC (rev 7193) @@ -16,7 +16,7 @@ { 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; @@ -23,7 +23,7 @@ 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 @@ { 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 @@ } 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 @@ } /* 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,7 +157,7 @@ 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; @@ -164,7 +164,7 @@ #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,7 +180,7 @@ 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; @@ -187,7 +187,7 @@ #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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ } 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 @@ 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 @@ #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 @@ 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 @@ } /* 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 @@ /* 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 @@ 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 @@ 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 @@ 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,7 +534,7 @@ } 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) @@ -541,7 +541,7 @@ #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 @@ } 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 @@ /* 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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ */ 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 @@ "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 @@ 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 @@ 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 @@ 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 @@ 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 @@ } 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 @@ 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 @@ 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,7 +1093,7 @@ } 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; @@ -1100,7 +1100,7 @@ #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 @@ } 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 @@ 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 @@ "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,7 +1221,7 @@ "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; @@ -1228,7 +1228,7 @@ #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 @@ } 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 @@ 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 @@ "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 @@ "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 @@ 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 @@ } } -#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 @@ } 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 @@ 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 @@ 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,7 +1576,7 @@ 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; @@ -1583,7 +1583,7 @@ #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,7 +1594,7 @@ } 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, @@ -1601,7 +1601,7 @@ #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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ } 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 @@ 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ } 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 @@ 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 @@ } 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 @@ "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 @@ "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 @@ } 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 @@ 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) Modified: trunk/qla2x00t/qla_def.h =================================================================== --- trunk/qla2x00t/qla_def.h 2017-05-20 03:29:41 UTC (rev 7192) +++ trunk/qla2x00t/qla_def.h 2017-05-23 02:23:38 UTC (rev 7193) @@ -27,7 +27,7 @@ #include <linux/aer.h> #include <linux/mutex.h> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) #include <linux/bsg-lib.h> #endif @@ -293,7 +293,7 @@ int iocbs; union { struct srb_iocb iocb_cmd; -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) struct fc_bsg_job *bsg_job; #else struct bsg_job *bsg_job; Modified: trunk/qla2x00t/qla_gbl.h =================================================================== --- trunk/qla2x00t/qla_gbl.h 2017-05-20 03:29:41 UTC (rev 7192) +++ trunk/qla2x00t/qla_gbl.h 2017-05-23 02:23:38 UTC (rev 7193) @@ -604,7 +604,7 @@ extern void qla82xx_clear_pending_mbx(scsi_qla_host_t *); /* BSG related functions */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) extern int qla24xx_bsg_request(struct bsg_job *); extern int qla24xx_bsg_timeout(struct bsg_job *); #else Modified: trunk/qla2x00t/qla_iocb.c =================================================================== --- trunk/qla2x00t/qla_iocb.c 2017-05-20 03:29:41 UTC (rev 7192) +++ trunk/qla2x00t/qla_iocb.c 2017-05-23 02:23:38 UTC (rev 7193) @@ -2105,7 +2105,7 @@ static void qla24xx_els_iocb(srb_t *sp, struct els_entry_24xx *els_iocb) { -#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; @@ -2125,7 +2125,7 @@ els_iocb->opcode = sp->type == SRB_ELS_CMD_RPT ? -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) bsg_job->request->rqst_data.r_els.els_code : bsg_job->request->rqst_data.h_els.command_code; #else @@ -2166,7 +2166,7 @@ uint16_t tot_dsds; scsi_qla_host_t *vha = sp->fcport->vha; struct qla_hw_data *ha = vha->hw; -#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; @@ -2247,7 +2247,7 @@ uint16_t tot_dsds; scsi_qla_host_t *vha = sp->fcport->vha; struct qla_hw_data *ha = vha->hw; -#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; Modified: trunk/qla2x00t/qla_isr.c =================================================================== --- trunk/qla2x00t/qla_isr.c 2017-05-20 03:29:41 UTC (rev 7192) +++ trunk/qla2x00t/qla_isr.c 2017-05-23 02:23:38 UTC (rev 7193) @@ -1080,7 +1080,7 @@ const char func[] = "CT_IOCB"; const char *type; srb_t *sp; -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) struct fc_bsg_job *bsg_job; #else struct bsg_job *bsg_job; @@ -1094,7 +1094,7 @@ return; bsg_job = sp->u.bsg_job; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) bsg_reply = bsg_job->reply; #endif @@ -1105,7 +1105,7 @@ /* return FC_CTELS_STATUS_OK and leave the decoding of the ELS/CT * fc payload to the caller */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) bsg_job->reply->reply_data.ctels_reply.status = FC_CTELS_STATUS_OK; #else bsg_reply->reply_data.ctels_reply.status = FC_CTELS_STATUS_OK; @@ -1115,7 +1115,7 @@ if (comp_status != CS_COMPLETE) { if (comp_status == CS_DATA_UNDERRUN) { res = DID_OK << 16; -#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 = @@ -1126,7 +1126,7 @@ "CT pass-through-%s error " "comp_status-status=0x%x total_byte = 0x%x.\n", type, comp_status, -#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); @@ -1136,7 +1136,7 @@ "CT pass-through-%s error " "comp_status-status=0x%x.\n", type, comp_status); res = DID_ERROR << 16; -#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; #else bsg_reply->reply_payload_rcv_len = 0; @@ -1146,7 +1146,7 @@ (uint8_t *)pkt, sizeof(*pkt)); } else { res = DID_OK << 16; -#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 = @@ -1164,7 +1164,7 @@ const char func[] = "ELS_CT_IOCB"; const char *type; srb_t *sp; -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) struct fc_bsg_job *bsg_job; #else struct bsg_job *bsg_job; @@ -1179,7 +1179,7 @@ if (!sp) return; bsg_job = sp->u.bsg_job; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) bsg_reply = bsg_job->reply; #endif @@ -1205,7 +1205,7 @@ /* return FC_CTELS_STATUS_OK and leave the decoding of the ELS/CT * fc payload to the caller */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) bsg_job->reply->reply_data.ctels_reply.status = FC_CTELS_STATUS_OK; #else bsg_reply->reply_data.ctels_reply.status = FC_CTELS_STATUS_OK; @@ -1215,7 +1215,7 @@ if (comp_status != CS_COMPLETE) { if (comp_status == CS_DATA_UNDERRUN) { res = DID_OK << 16; -#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 = @@ -1241,7 +1241,7 @@ le16_to_cpu(((struct els_sts_entry_24xx *) pkt)->error_subcode_2)); res = DID_ERROR << 16; -#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; #else bsg_reply->reply_payload_rcv_len = 0; @@ -1254,7 +1254,7 @@ } else { res = DID_OK << 16; -#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 = bsg_job->reply_payload.payload_len; #else bsg_reply->reply_payload_rcv_len = bsg_job->reply_payload.payload_len; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |