From a31d58a49d435d9ccc9cfca66518eb22ad0350e8 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 2 Jul 2021 00:35:28 +0000 Subject: [PATCH 1/2] nightly build: Update kernel versions git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9471 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- nightly/conf/nightly.conf | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index f27c7a7ae..db6660d1d 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -3,36 +3,37 @@ ABT_DETAILS="x86_64" ABT_JOBS=5 ABT_KERNELS=" \ -5.12.12 \ +5.13 \ +5.12.14-nc \ 5.11.22-nc \ -5.10.45-nc \ +5.10.47-nc \ 5.9.16-nc \ 5.8.18-nc \ 5.7.19-nc \ 5.6.19-nc \ 5.5.19-nc \ -5.4.127-nc \ +5.4.129-nc \ 5.3.18-nc \ 5.2.21-nc \ 5.1.21-nc \ 5.0.21-nc \ 4.20.17-nc \ -4.19.195-nc \ +4.19.196-nc \ 4.18.20-nc \ 4.17.19-nc \ 4.16.18-nc \ 4.15.18-nc \ -4.14.237-nc \ +4.14.238-nc \ 4.13.16-nc \ 4.12.14-nc \ 4.11.12-nc \ 4.10.17-nc \ -4.9.273-nc \ +4.9.274-nc \ 4.8.17-nc \ 4.7.10-nc \ 4.6.7-nc \ 4.5.7-nc \ -4.4.273-nc \ +4.4.274-nc \ 4.3.6-nc \ 4.2.8-nc \ 4.1.52-nc \ From 2a775c42315f7f13eef41e7f28a343505ce7f0e6 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 2 Jul 2021 00:54:43 +0000 Subject: [PATCH 2/2] scst: Port to Linux kernel v5.13 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9472 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 9c8d60c75..9010e1c78 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5421,7 +5421,9 @@ static int scst_alloc_add_tgt_dev(struct scst_session *sess, struct Scsi_Host *shost = dev->scsi_dev->host; ini_sg = shost->sg_tablesize; +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0) ini_unchecked_isa_dma = shost->unchecked_isa_dma; +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0) ini_use_clustering = shost->use_clustering == ENABLE_CLUSTERING; #else @@ -8160,7 +8162,11 @@ static struct blk_kern_sg_work *blk_copy_kern_sg(struct request_queue *q, for_each_sg(new_sgl, sg, new_sgl_nents, i) { struct page *pg; +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0) pg = alloc_page(q->bounce_gfp | gfp_mask); +#else + pg = alloc_page(gfp_mask); +#endif if (pg == NULL) goto err_free_table; @@ -8259,10 +8265,6 @@ static struct request *blk_make_request(struct request_queue *q, blk_queue_bounce(q, &bounce_bio); ret = blk_rq_append_bio(rq, bounce_bio); - if (unlikely(ret)) { - blk_put_request(rq); - return ERR_PTR(ret); - } /* * See also commit 0abc2a10389f ("block: fix * blk_rq_append_bio"). That commit has been backported to @@ -8271,17 +8273,15 @@ static struct request *blk_make_request(struct request_queue *q, #elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 11) && \ !defined(CONFIG_SUSE_KERNEL) ret = blk_rq_append_bio(rq, bio); - if (unlikely(ret)) { - blk_put_request(rq); - return ERR_PTR(ret); - } -#else +#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0) ret = blk_rq_append_bio(rq, &bio); +#else + ret = blk_rq_append_bio(rq, bio); +#endif if (unlikely(ret)) { blk_put_request(rq); return ERR_PTR(ret); } -#endif } return rq;