summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_debug.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-12-13 16:17:03 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2018-12-18 23:13:12 -0500
commit50c2e9107f176a82e14567b39c5d0f2a208cc82c (patch)
tree94cdec8e5724b7fb66f0781bcf6a4360653b097e /drivers/scsi/scsi_debug.c
parent2a3d4eb8e228061c09d5ca8bf39e7f00c2091213 (diff)
scsi: introduce a max_segment_size host_template parameters
This allows the host driver to indicate the maximum supported segment size in a nice an easy way, so that the driver doesn't have to worry about DMA-layer imposed limitations. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r--drivers/scsi/scsi_debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 53ba417bef8a..57d418d7d74e 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -3973,7 +3973,6 @@ static int scsi_debug_slave_configure(struct scsi_device *sdp)
return 1; /* no resources, will be marked offline */
}
sdp->hostdata = devip;
- blk_queue_max_segment_size(sdp->request_queue, -1U);
if (sdebug_no_uld)
sdp->no_uld_attach = 1;
config_cdb_len(sdp);
@@ -5851,6 +5850,7 @@ static struct scsi_host_template sdebug_driver_template = {
.sg_tablesize = SG_MAX_SEGMENTS,
.cmd_per_lun = DEF_CMD_PER_LUN,
.max_sectors = -1U,
+ .max_segment_size = -1U,
.module = THIS_MODULE,
.track_queue_depth = 1,
};