summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_transport_iscsi.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-04-09 17:37:29 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2024-04-12 04:37:48 +0300
commitafd53a3d852808bfeb5bc3ae3cd1caa9389bcc94 (patch)
tree6403d333ee5008fb0d19a44497b7fe3307bcea02 /drivers/scsi/scsi_transport_iscsi.c
parent9042fb6d2c085eccdf11069b04754dac807c36ea (diff)
downloadlinux-afd53a3d852808bfeb5bc3ae3cd1caa9389bcc94.tar.xz
scsi: core: Initialize scsi midlayer limits before allocating the queue
Turn __scsi_init_queue() into scsi_init_limits() which initializes queue_limits structure that can be passed to blk_mq_alloc_queue(). Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20240409143748.980206-5-hch@lst.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index c131746bf207..5e1bb488da15 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -1535,6 +1535,7 @@ iscsi_bsg_host_add(struct Scsi_Host *shost, struct iscsi_cls_host *ihost)
{
struct device *dev = &shost->shost_gendev;
struct iscsi_internal *i = to_iscsi_internal(shost->transportt);
+ struct queue_limits lim;
struct request_queue *q;
char bsg_name[20];
@@ -1542,14 +1543,14 @@ iscsi_bsg_host_add(struct Scsi_Host *shost, struct iscsi_cls_host *ihost)
return -ENOTSUPP;
snprintf(bsg_name, sizeof(bsg_name), "iscsi_host%d", shost->host_no);
- q = bsg_setup_queue(dev, bsg_name, NULL, iscsi_bsg_host_dispatch, NULL,
+ scsi_init_limits(shost, &lim);
+ q = bsg_setup_queue(dev, bsg_name, &lim, iscsi_bsg_host_dispatch, NULL,
0);
if (IS_ERR(q)) {
shost_printk(KERN_ERR, shost, "bsg interface failed to "
"initialize - no request queue\n");
return PTR_ERR(q);
}
- __scsi_init_queue(shost, q);
ihost->bsg_q = q;
return 0;