diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 1aaf1c5c1..3c1117f6e 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -445,8 +445,15 @@ static int qla2x00_mem_alloc(struct qla_hw_data *, uint16_t, uint16_t, struct req_que **, struct rsp_que **); static void qla2x00_free_fw_dump(struct qla_hw_data *); static void qla2x00_mem_free(struct qla_hw_data *); -int qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd, - struct qla_qpair *qpair); +#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 0, 0) +static int qla2xxx_mqueuecommand(struct Scsi_Host *host, + struct scsi_cmnd *cmd, + struct qla_qpair *qpair); +#else +static enum scsi_qc_status qla2xxx_mqueuecommand(struct Scsi_Host *host, + struct scsi_cmnd *cmd, + struct qla_qpair *qpair); +#endif /* -------------------------------------------------------------------------- */ static void qla_init_base_qpair(struct scsi_qla_host *vha, struct req_que *req, @@ -901,8 +908,13 @@ void qla2xxx_qpair_sp_compl(srb_t *sp, int res) complete(comp); } -static int -qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) +#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 0, 0) +static int qla2xxx_queuecommand(struct Scsi_Host *host, + struct scsi_cmnd *cmd) +#else +static enum scsi_qc_status qla2xxx_queuecommand(struct Scsi_Host *host, + struct scsi_cmnd *cmd) +#endif { scsi_qla_host_t *vha = shost_priv(host); fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; @@ -1026,9 +1038,15 @@ qc24_fail_command: } /* For MQ supported I/O */ -int +#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 0, 0) +static int qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd, - struct qla_qpair *qpair) + struct qla_qpair *qpair) +#else +static enum scsi_qc_status +qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd, + struct qla_qpair *qpair) +#endif { scsi_qla_host_t *vha = shost_priv(host); fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index db3dc939d..513a7f5ee 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -257,10 +257,11 @@ static void qla2xxx_sdev_destroy(struct scsi_device *sdev); static int qla2xxx_scan_finished(struct Scsi_Host *, unsigned long time); static void qla2xxx_scan_start(struct Scsi_Host *); #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) -static int qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, - void (*fn)(struct scsi_cmnd *)); -#else +static int qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); +#elif LINUX_VERSION_CODE < KERNEL_VERSION(7, 0, 0) static int qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd); +#else +static enum scsi_qc_status qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd); #endif static DEF_SCSI_QCMD(qla2xxx_queuecommand); static int qla2xxx_eh_abort(struct scsi_cmnd *); @@ -690,10 +691,11 @@ qla2x00_sp_compl(void *data, void *ptr, int res) } #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) -static int -qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) +static int qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) +#elif LINUX_VERSION_CODE < KERNEL_VERSION(7, 0, 0) +static int qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd); #else -static int qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd) +static enum scsi_qc_status qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd) #endif { scsi_qla_host_t *vha = shost_priv(cmd->device->host); diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 2643e28f9..caf0cfef6 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -839,8 +839,11 @@ static int scst_local_send_resp(struct scsi_cmnd *cmnd, * This does the heavy lifting ... we pass all the commands on to the * target driver and have it do its magic ... */ -static int scst_local_queuecommand(struct Scsi_Host *host, - struct scsi_cmnd *scmd) +#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 0, 0) +static int scst_local_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmd) +#else +static enum scsi_qc_status scst_local_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmd) +#endif { struct scst_local_sess *sess; struct scatterlist *sgl = NULL;