Merge branch 'svn-trunk'

This commit is contained in:
Bart Van Assche
2019-09-25 06:59:32 -07:00
7 changed files with 46 additions and 21 deletions
+7 -4
View File
@@ -7160,7 +7160,8 @@ static int qla2xxx_map_queues(struct Scsi_Host *shost)
if (USER_CTRL_IRQ(vha->hw))
rc = blk_mq_map_queues(&shost->tag_set);
else
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) && \
!defined(CONFIG_SUSE_KERNEL)
/*
* See also commit f23f5bece686 ("blk-mq: Allow PCI vector
* offset for mapping queues") # v4.17.
@@ -7216,8 +7217,9 @@ struct scsi_host_template qla2xxx_driver_template = {
.cmd_size = sizeof(srb_t),
};
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) && \
LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) && \
LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
static void qla_pci_reset_notify(struct pci_dev *dev, bool prepare)
{
if (prepare)
@@ -7238,7 +7240,8 @@ struct pci_error_handlers qla2xxx_err_handler = {
.slot_reset = qla2xxx_pci_slot_reset,
.resume = qla2xxx_pci_resume,
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
.reset_notify = qla_pci_reset_notify,
#else
.reset_prepare = qla_pci_reset_prepare,
+2 -1
View File
@@ -25,7 +25,8 @@ static inline void set_bsg_result(struct bsg_job *job, int result)
{
job->req->errors = result;
}
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) && \
!defined(CONFIG_SUSE_KERNEL)
static inline void set_bsg_result(struct bsg_job *job, int result)
{
scsi_req(job->req)->result = result;
+13 -4
View File
@@ -94,7 +94,8 @@ static __always_inline unsigned long long rdtsc(void)
/* <linux/bio.h> */
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
static inline struct bio_set *bioset_create_backport(unsigned int pool_size,
unsigned int front_pad,
int flags)
@@ -107,7 +108,8 @@ static inline struct bio_set *bioset_create_backport(unsigned int pool_size,
#endif
/* See also commit 74d46992e0d9. */
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) && \
!defined(CONFIG_SUSE_KERNEL)
static inline void bio_set_dev(struct bio *bio, struct block_device *bdev)
{
bio->bi_bdev = bdev;
@@ -168,7 +170,8 @@ static inline void *bsg_job_sense(struct bsg_job *job)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
return job->req->sense;
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) && \
!defined(CONFIG_SUSE_KERNEL)
return scsi_req(job->req)->sense;
#else
return scsi_req(blk_mq_rq_from_pdu(job))->sense;
@@ -465,7 +468,8 @@ static inline ssize_t call_write_iter(struct file *file, struct kiocb *kio,
* See also commit b745fafaf70c ("fs: Introduce RWF_NOWAIT and
* FMODE_AIO_NOWAIT") # v4.13.
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
#define IOCB_NOWAIT 0
#endif
@@ -489,7 +493,11 @@ static inline ssize_t
kernel_write_backport(struct file *file, const void *buf, size_t count,
loff_t *pos)
{
#ifndef CONFIG_SUSE_KERNEL
return kernel_write(file, buf, count, *pos);
#else
return kernel_write(file, buf, count, pos);
#endif
}
#define kernel_write kernel_write_backport
@@ -910,6 +918,7 @@ static inline void *kvzalloc(size_t size, gfp_t flags)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0) && \
(!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7 || \
RHEL_MAJOR -0 == 7 && RHEL_MINOR -0 < 7) && \
!defined(CONFIG_SUSE_KERNEL) && \
!defined(_COMPAT_LINUX_MM_H)
/* See also commit 1c542f38ab8d ("mm: Introduce kvcalloc()") # v4.18. */
static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
+2 -1
View File
@@ -5393,7 +5393,8 @@ void scst_dev_inquiry_data_changed(struct scst_device *dev);
* allows exclusive wake ups of threads in LIFO order. We need it to let (yet)
* unneeded threads sleep and not pollute CPU cache by their stacks.
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
static inline void prepare_to_wait_exclusive_head(wait_queue_head_t *q,
wait_queue_t *wait, int state)
{
+6 -3
View File
@@ -407,7 +407,8 @@ static void vdev_flush_end_io(struct bio *bio, int error)
#else
static void vdev_flush_end_io(struct bio *bio)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
int error = bio->bi_error;
#else
int error = blk_status_to_errno(bio->bi_status);
@@ -2864,7 +2865,8 @@ static void blockio_end_sync_io(struct bio *bio, int error)
#else
static void blockio_end_sync_io(struct bio *bio)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
int error = bio->bi_error;
#else
int error = blk_status_to_errno(bio->bi_status);
@@ -5862,7 +5864,8 @@ static void blockio_endio(struct bio *bio, int error)
#else
static void blockio_endio(struct bio *bio)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
int error = bio->bi_error;
#else
int error = blk_status_to_errno(bio->bi_status);
+14 -7
View File
@@ -7918,7 +7918,8 @@ static void blk_bio_map_kern_endio(struct bio *bio, int err)
#else
static void blk_bio_map_kern_endio(struct bio *bio)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
int err = bio->bi_error;
#else
int err = blk_status_to_errno(bio->bi_status);
@@ -8101,7 +8102,8 @@ static struct request *blk_make_request(struct request_queue *q,
if (IS_ERR(rq))
return rq;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \
defined(CONFIG_SUSE_KERNEL)
scsi_req_init(scsi_req(rq));
#else
scsi_req_init(rq);
@@ -8110,7 +8112,8 @@ static struct request *blk_make_request(struct request_queue *q,
for_each_bio(bio) {
int ret;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
struct bio *bounce_bio = bio;
blk_queue_bounce(q, &bounce_bio);
@@ -8124,7 +8127,8 @@ static struct request *blk_make_request(struct request_queue *q,
* blk_rq_append_bio"). That commit has been backported to
* kernel v4.14.11 as 88da02868f77.
*/
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 11)
#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);
@@ -8347,7 +8351,8 @@ static struct request *blk_map_kern_sg(struct request_queue *q,
if (unlikely(!rq))
return ERR_PTR(-ENOMEM);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \
defined(CONFIG_SUSE_KERNEL)
scsi_req_init(scsi_req(rq));
#else
scsi_req_init(rq);
@@ -8533,7 +8538,8 @@ out:
#endif /* !defined(SCSI_EXEC_REQ_FIFO_DEFINED) */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
static void scsi_end_async(struct request *req, int error)
#else
static void scsi_end_async(struct request *req, blk_status_t error)
@@ -8704,7 +8710,8 @@ out_free_unmap:
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
b->bi_end_io(b, res);
#else
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
b->bi_error = res;
#else
b->bi_status = errno_to_blk_status(res);
+2 -1
View File
@@ -1174,7 +1174,8 @@ static int scst_local_change_queue_depth(struct scsi_device *sdev, int qdepth)
static int scst_local_slave_alloc(struct scsi_device *sdev)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) && \
!defined(CONFIG_SUSE_KERNEL)
#if !defined(RHEL_MAJOR) || RHEL_MAJOR -0 >= 6
queue_flag_set_unlocked(QUEUE_FLAG_BIDI, sdev->request_queue);
#endif