Skip to content

Commit 8312cd3

Browse files
Ming Leimartinkpetersen
authored andcommitted
scsi: megaraid: Clear READ queue map's nr_queues
The megaraid SCSI driver sets set->nr_maps as 3 if poll_queues is > 0, and blk-mq actually initializes each map's nr_queues as nr_hw_queues. Consequently the driver has to clear READ queue map's nr_queues, otherwise the queue map becomes broken if poll_queues is set as non-zero. Link: https://lore.kernel.org/r/20220706125942.528533-1-ming.lei@redhat.com Fixes: 9e4bec5 ("scsi: megaraid_sas: mq_poll support") Cc: Kashyap Desai <kashyap.desai@broadcom.com> Cc: sumit.saxena@broadcom.com Cc: chandrakanth.patil@broadcom.com Cc: linux-block@vger.kernel.org Cc: Hannes Reinecke <hare@suse.de> Reported-by: Guangwu Zhang <guazhang@redhat.com> Tested-by: Guangwu Zhang <guazhang@redhat.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent ccd3f44 commit 8312cd3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/scsi/megaraid/megaraid_sas_base.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,6 +3195,9 @@ static int megasas_map_queues(struct Scsi_Host *shost)
31953195
qoff += map->nr_queues;
31963196
offset += map->nr_queues;
31973197

3198+
/* we never use READ queue, so can't cheat blk-mq */
3199+
shost->tag_set.map[HCTX_TYPE_READ].nr_queues = 0;
3200+
31983201
/* Setup Poll hctx */
31993202
map = &shost->tag_set.map[HCTX_TYPE_POLL];
32003203
map->nr_queues = instance->iopoll_q_count;

0 commit comments

Comments
 (0)