mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 22:26:23 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
@@ -357,6 +357,14 @@ static inline int __must_check kref_get_unless_zero(struct kref *kref)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* <linux/kthread.h> */
|
||||
|
||||
/* See also commit 207205a2ba26 */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
|
||||
#define kthread_create_on_node(threadfn, data, node, namefmt, arg...)\
|
||||
kthread_create((threadfn), (data), ##arg)
|
||||
#endif
|
||||
|
||||
/* <linux/ktime.h> */
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) && \
|
||||
|
||||
+8
-5
@@ -8390,15 +8390,18 @@ static void scsi_end_async(struct request *req, int error)
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
resid_len = scsi_req(req)->resid_len;
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
|
||||
resid_len = req->resid_len;
|
||||
#else
|
||||
/*
|
||||
* A quote from commit c3a4d78c580d: "rq->data_len served two
|
||||
* purposes - the length of data buffer on issue and the
|
||||
* residual count on completion."
|
||||
*/
|
||||
resid_len = req->data_len;
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
|
||||
sioc->done(sioc->data, sioc->sense, result, resid_len);
|
||||
#else
|
||||
sioc->done(sioc->data, sioc->sense, result, req->data_len);
|
||||
#endif
|
||||
}
|
||||
|
||||
kmem_cache_free(scsi_io_context_cache, sioc);
|
||||
|
||||
Reference in New Issue
Block a user