mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
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
This commit is contained in:
@@ -5421,7 +5421,9 @@ static int scst_alloc_add_tgt_dev(struct scst_session *sess,
|
|||||||
struct Scsi_Host *shost = dev->scsi_dev->host;
|
struct Scsi_Host *shost = dev->scsi_dev->host;
|
||||||
|
|
||||||
ini_sg = shost->sg_tablesize;
|
ini_sg = shost->sg_tablesize;
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
|
||||||
ini_unchecked_isa_dma = shost->unchecked_isa_dma;
|
ini_unchecked_isa_dma = shost->unchecked_isa_dma;
|
||||||
|
#endif
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0)
|
||||||
ini_use_clustering = shost->use_clustering == ENABLE_CLUSTERING;
|
ini_use_clustering = shost->use_clustering == ENABLE_CLUSTERING;
|
||||||
#else
|
#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) {
|
for_each_sg(new_sgl, sg, new_sgl_nents, i) {
|
||||||
struct page *pg;
|
struct page *pg;
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
|
||||||
pg = alloc_page(q->bounce_gfp | gfp_mask);
|
pg = alloc_page(q->bounce_gfp | gfp_mask);
|
||||||
|
#else
|
||||||
|
pg = alloc_page(gfp_mask);
|
||||||
|
#endif
|
||||||
if (pg == NULL)
|
if (pg == NULL)
|
||||||
goto err_free_table;
|
goto err_free_table;
|
||||||
|
|
||||||
@@ -8259,10 +8265,6 @@ static struct request *blk_make_request(struct request_queue *q,
|
|||||||
|
|
||||||
blk_queue_bounce(q, &bounce_bio);
|
blk_queue_bounce(q, &bounce_bio);
|
||||||
ret = blk_rq_append_bio(rq, 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
|
* See also commit 0abc2a10389f ("block: fix
|
||||||
* blk_rq_append_bio"). That commit has been backported to
|
* 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) && \
|
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 11) && \
|
||||||
!defined(CONFIG_SUSE_KERNEL)
|
!defined(CONFIG_SUSE_KERNEL)
|
||||||
ret = blk_rq_append_bio(rq, bio);
|
ret = blk_rq_append_bio(rq, bio);
|
||||||
if (unlikely(ret)) {
|
#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
|
||||||
blk_put_request(rq);
|
|
||||||
return ERR_PTR(ret);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
ret = blk_rq_append_bio(rq, &bio);
|
ret = blk_rq_append_bio(rq, &bio);
|
||||||
|
#else
|
||||||
|
ret = blk_rq_append_bio(rq, bio);
|
||||||
|
#endif
|
||||||
if (unlikely(ret)) {
|
if (unlikely(ret)) {
|
||||||
blk_put_request(rq);
|
blk_put_request(rq);
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rq;
|
return rq;
|
||||||
|
|||||||
Reference in New Issue
Block a user