qla2x00t-32gbit: Backport to older kernel versions

The commit ec325c9913bd ("qla2x00t-32gbit: edif: Add bsg interface to
read doorbell events") introduced the use of the sg_copy_buffer()
function.

The kernel has only exported this function since version v4.2, so use
sg_pcopy_from_buffer() instead, which is already supported by older
kernel versions.
This commit is contained in:
Gleb Chesnokov
2022-09-13 10:49:31 +03:00
parent 8f0b70f56f
commit c3b8db1d41
+2 -2
View File
@@ -1142,9 +1142,9 @@ static int qla_edif_consume_dbell(scsi_qla_host_t *vha, BSG_JOB_TYPE *bsg_job)
/* 8 = sizeof(ap.event_code + ap.event_data_size) */
dat_size += 8;
if (keep)
sg_skip += sg_copy_buffer(bsg_job->reply_payload.sg_list,
sg_skip += sg_pcopy_from_buffer(bsg_job->reply_payload.sg_list,
bsg_job->reply_payload.sg_cnt,
&ap, dat_size, sg_skip, false);
&ap, dat_size, sg_skip);
ql_dbg(ql_dbg_edif, vha, 0x09102,
"%s Doorbell consumed : type=%d %p\n",