mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-21 06:36:27 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
Vendored
+1
-1
@@ -35,7 +35,7 @@ Description: SCST development header and symbol files
|
||||
|
||||
Package: scstadmin
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, lsb-base, perl
|
||||
Depends: ${misc:Depends}, lsb-base, perl, psmisc
|
||||
Description: SCST admininstration tool
|
||||
scstadmin is a tool that uses the SCST sysfs interface to query and modify
|
||||
SCST settings.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
ABT_DETAILS="x86_64"
|
||||
ABT_JOBS=5
|
||||
ABT_KERNELS=" \
|
||||
4.19.6 \
|
||||
4.20 \
|
||||
4.19.13-nc \
|
||||
4.18.18-nc \
|
||||
4.17.18-nc \
|
||||
4.16.18-nc \
|
||||
|
||||
+1
-1
@@ -1875,7 +1875,7 @@ static void qla25xx_set_que(srb_t *sp, struct rsp_que **rsp)
|
||||
{
|
||||
struct scsi_cmnd *cmd = GET_CMD_SP(sp);
|
||||
struct qla_hw_data *ha = sp->fcport->vha->hw;
|
||||
int affinity = cmd->request->cpu;
|
||||
int affinity = scst_blk_rq_cpu(cmd->request);
|
||||
|
||||
if (ha->flags.cpu_affinity_enabled && affinity >= 0 &&
|
||||
affinity < ha->max_rsp_queues - 1)
|
||||
|
||||
+4
-1
@@ -304,7 +304,9 @@ struct scsi_host_template qla2xxx_driver_template = {
|
||||
#endif
|
||||
.this_id = -1,
|
||||
.cmd_per_lun = 3,
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0)
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
#endif
|
||||
.sg_tablesize = SG_ALL,
|
||||
|
||||
.max_sectors = 0xFFFF,
|
||||
@@ -1160,7 +1162,8 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type,
|
||||
goto eh_reset_failed;
|
||||
}
|
||||
err = 2;
|
||||
if (do_reset(fcport, cmd->device->lun, cmd->request->cpu + 1)
|
||||
if (do_reset(fcport, cmd->device->lun,
|
||||
scst_blk_rq_cpu(cmd->request) + 1)
|
||||
!= QLA_SUCCESS) {
|
||||
ql_log(ql_log_warn, vha, 0x800c,
|
||||
"do_reset failed for cmd=%p.\n", cmd);
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
|
||||
#include <linux/bio.h>
|
||||
#include <linux/blkdev.h> /* struct request_queue */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 21, 0)
|
||||
#include <linux/blk-mq.h>
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
#include <linux/bsg-lib.h> /* struct bsg_job */
|
||||
#endif
|
||||
@@ -115,6 +118,17 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* <linux/blk-mq.h> */
|
||||
|
||||
static inline unsigned int scst_blk_rq_cpu(struct request *rq)
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0)
|
||||
return rq->cpu;
|
||||
#else
|
||||
return blk_mq_rq_cpu(rq);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* <linux/bsg-lib.h> */
|
||||
|
||||
/*
|
||||
|
||||
+16
-5
@@ -5368,10 +5368,16 @@ static int scst_alloc_add_tgt_dev(struct scst_session *sess,
|
||||
scst_sgv_pool_use_norm(tgt_dev);
|
||||
|
||||
if (dev->scsi_dev != NULL) {
|
||||
ini_sg = dev->scsi_dev->host->sg_tablesize;
|
||||
ini_unchecked_isa_dma = dev->scsi_dev->host->unchecked_isa_dma;
|
||||
ini_use_clustering = (dev->scsi_dev->host->use_clustering ==
|
||||
ENABLE_CLUSTERING);
|
||||
struct Scsi_Host *shost = dev->scsi_dev->host;
|
||||
|
||||
ini_sg = shost->sg_tablesize;
|
||||
ini_unchecked_isa_dma = shost->unchecked_isa_dma;
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0)
|
||||
ini_use_clustering = shost->use_clustering == ENABLE_CLUSTERING;
|
||||
#else
|
||||
ini_use_clustering = !(shost->dma_boundary == PAGE_SIZE - 1 &&
|
||||
shost->max_segment_size == PAGE_SIZE);
|
||||
#endif
|
||||
} else {
|
||||
ini_sg = (1 << 15) /* infinite */;
|
||||
ini_unchecked_isa_dma = 0;
|
||||
@@ -8515,7 +8521,7 @@ static void scsi_end_async(struct request *req, blk_status_t error)
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
|
||||
lockdep_assert_held(req->q->queue_lock);
|
||||
#else
|
||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0)
|
||||
if (!req->q->mq_ops)
|
||||
lockdep_assert_held(req->q->queue_lock);
|
||||
#endif
|
||||
@@ -8550,7 +8556,12 @@ static void scsi_end_async(struct request *req, blk_status_t error)
|
||||
|
||||
kmem_cache_free(scsi_io_context_cache, sioc);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0)
|
||||
/* See also commit 92bc5a24844a ("block: remove __blk_put_request()") */
|
||||
__blk_put_request(req->q, req);
|
||||
#else
|
||||
blk_put_request(req);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1663,7 +1663,12 @@ static struct scsi_host_template scst_lcl_ini_driver_template = {
|
||||
.sg_tablesize = 0xFFFF,
|
||||
.max_sectors = 0xffff,
|
||||
/* Possible pass-through backend device may not support clustering */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0)
|
||||
.use_clustering = DISABLE_CLUSTERING,
|
||||
#else
|
||||
.dma_boundary = PAGE_SIZE - 1,
|
||||
.max_segment_size = PAGE_SIZE,
|
||||
#endif
|
||||
.skip_settle_delay = 1,
|
||||
.module = THIS_MODULE,
|
||||
};
|
||||
|
||||
@@ -1074,14 +1074,25 @@ out:
|
||||
*/
|
||||
static int srpt_zerolength_write(struct srpt_rdma_ch *ch)
|
||||
{
|
||||
#ifdef USE_PRE_440_WR_STRUCTURE
|
||||
struct ib_send_wr wr;
|
||||
#else
|
||||
struct ib_rdma_wr wr;
|
||||
#endif
|
||||
BAD_WR_MODIFIER struct ib_send_wr *bad_wr;
|
||||
|
||||
memset(&wr, 0, sizeof(wr));
|
||||
#ifdef USE_PRE_440_WR_STRUCTURE
|
||||
wr.opcode = IB_WR_RDMA_WRITE;
|
||||
wr.wr_id = encode_wr_id(SRPT_RDMA_ZEROLENGTH_WRITE, 0xffffffffUL);
|
||||
wr.send_flags = IB_SEND_SIGNALED;
|
||||
return ib_post_send(ch->qp, &wr, &bad_wr);
|
||||
#else
|
||||
wr.wr.opcode = IB_WR_RDMA_WRITE;
|
||||
wr.wr.wr_id = encode_wr_id(SRPT_RDMA_ZEROLENGTH_WRITE, 0xffffffffUL);
|
||||
wr.wr.send_flags = IB_SEND_SIGNALED;
|
||||
return ib_post_send(ch->qp, &wr.wr, &bad_wr);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user