Merge branch 'svn-trunk'

This commit is contained in:
Bart Van Assche
2020-03-20 10:26:15 -07:00
6 changed files with 44 additions and 15 deletions

View File

@@ -2153,7 +2153,17 @@ static void qla24xx_nvme_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
struct nvme_fc_ersp_iu *rsp_iu = fd->rspaddr;
u32 tgt_xfer_len;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
/*
* xfrd_len was introduced by commit b1ad1475b447
* ("nvme-fabrics: Add FC transport FC-NVME definitions")
* # v4.10.
*/
tgt_xfer_len = be32_to_cpu(rsp_iu->xfrd_len);
#else
WARN_ON_ONCE(true);
tgt_xfer_len = 0;
#endif
if (fd->transferred_length != tgt_xfer_len) {
ql_dbg(ql_dbg_io, fcport->vha, 0x3079,
"Dropped frame(s) detected (sent/rcvd=%u/%u).\n",

View File

@@ -1787,8 +1787,13 @@ static void qla2x00_abort_srb(struct qla_qpair *qp, srb_t *sp, const int res,
}
spin_lock_irqsave(qp->qp_lock_ptr, *flags);
#if HAVE_SCSI_MQ
if (ret_cmd && blk_mq_request_started(cmd->request))
sp->done(sp, res);
#else
if (ret_cmd && list_empty(&cmd->request->queuelist))
sp->done(sp, res);
#endif
} else {
sp->done(sp, res);
}

View File

@@ -332,7 +332,7 @@ index d6d65537b0d9..6aad8308a0ac 100644
EOF
fi
case "$1" in
2.6.3[6-9]*|3.[0-9]|3.[0-9].*|3.1[01345]|3.1[01345].*|3.17|3.17.*|3.19|3.19.*|4.[023567]|4.[023567].*)
2.6.3[6-9]*|3.[0-9]|3.[0-9].*|3.1[01345]|3.1[01345].*|3.1[789]|3.1[789].*|4.[023567]|4.[023567].*)
patch -p1 <<'EOF'
From c6a385539175ebc603da53aafb7753d39089f32e Mon Sep 17 00:00:00 2001
From: Borislav Petkov <bp@suse.de>

View File

@@ -182,6 +182,21 @@ static inline void *bsg_job_sense(struct bsg_job *job)
#endif
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) */
/* <linux/byteorder/generic.h> */
/*
* See also f2f2efb807d3 ("byteorder: Move {cpu_to_be32, be32_to_cpu}_array()
* from Thunderbolt to core") # v4.15.
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)
{
int i;
for (i = 0; i < len; i++)
dst[i] = cpu_to_be32(src[i]);
}
#endif
/* <linux/compiler.h> */
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20)

View File

@@ -16,6 +16,5 @@ enum scst_exec_res scst_release_local(struct scst_cmd *cmd);
enum scst_exec_res scst_report_luns_local(struct scst_cmd *cmd);
enum scst_exec_res scst_request_sense_local(struct scst_cmd *cmd);
enum scst_exec_res scst_reserve_local(struct scst_cmd *cmd);
enum scst_exec_res scst_reserve_local(struct scst_cmd *cmd);
#endif /* _SCST_LOCAL_CMD_H_ */

View File

@@ -2696,19 +2696,19 @@ out_done:
typedef enum scst_exec_res (*scst_local_exec_fn)(struct scst_cmd *cmd);
static scst_local_exec_fn scst_local_fns[256] = {
[RESERVE] = scst_reserve_local,
[RESERVE_10] = scst_reserve_local,
[RELEASE] = scst_release_local,
[RELEASE_10] = scst_release_local,
[PERSISTENT_RESERVE_IN] = scst_persistent_reserve_in_local,
[PERSISTENT_RESERVE_OUT] = scst_persistent_reserve_out_local,
[REPORT_LUNS] = scst_report_luns_local,
[REQUEST_SENSE] = scst_request_sense_local,
[COMPARE_AND_WRITE] = scst_cmp_wr_local,
[EXTENDED_COPY] = scst_cm_ext_copy_exec,
[RECEIVE_COPY_RESULTS] = scst_cm_rcv_copy_res_exec,
[MAINTENANCE_IN] = scst_maintenance_in,
[MAINTENANCE_OUT] = scst_maintenance_out,
[COMPARE_AND_WRITE] = scst_cmp_wr_local,
[EXTENDED_COPY] = scst_cm_ext_copy_exec,
[MAINTENANCE_IN] = scst_maintenance_in,
[MAINTENANCE_OUT] = scst_maintenance_out,
[PERSISTENT_RESERVE_IN] = scst_persistent_reserve_in_local,
[PERSISTENT_RESERVE_OUT]= scst_persistent_reserve_out_local,
[RECEIVE_COPY_RESULTS] = scst_cm_rcv_copy_res_exec,
[RELEASE] = scst_release_local,
[RELEASE_10] = scst_release_local,
[REPORT_LUNS] = scst_report_luns_local,
[REQUEST_SENSE] = scst_request_sense_local,
[RESERVE] = scst_reserve_local,
[RESERVE_10] = scst_reserve_local,
};
static enum scst_exec_res scst_do_local_exec(struct scst_cmd *cmd)