Skip to content

Commit 69bfa5f

Browse files
John Garrymartinkpetersen
authored andcommitted
scsi: hisi_sas: Don't check .nr_hw_queues in hisi_sas_task_prep()
Now that v2 and v3 hw expose their HW queues (and so shost.nr_hw_queues is set), remove the conditional checks in hisi_sas_task_prep(). This change would affect v1 HW performance (as it does not expose HW queues), but nobody uses it and support may be dropped soon. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Xiang Chen <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 4d287d8 commit 69bfa5f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/scsi/hisi_sas/hisi_sas_main.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,21 +445,19 @@ static int hisi_sas_task_prep(struct sas_task *task,
445445
}
446446
}
447447

448-
if (scmd && hisi_hba->shost->nr_hw_queues) {
448+
if (scmd) {
449449
unsigned int dq_index;
450450
u32 blk_tag;
451451

452452
blk_tag = blk_mq_unique_tag(scmd->request);
453453
dq_index = blk_mq_unique_tag_to_hwq(blk_tag);
454454
*dq_pointer = dq = &hisi_hba->dq[dq_index];
455-
} else if (hisi_hba->shost->nr_hw_queues) {
455+
} else {
456456
struct Scsi_Host *shost = hisi_hba->shost;
457457
struct blk_mq_queue_map *qmap = &shost->tag_set.map[HCTX_TYPE_DEFAULT];
458458
int queue = qmap->mq_map[raw_smp_processor_id()];
459459

460460
*dq_pointer = dq = &hisi_hba->dq[queue];
461-
} else {
462-
*dq_pointer = dq = sas_dev->dq;
463461
}
464462

465463
port = to_hisi_sas_port(sas_port);

0 commit comments

Comments
 (0)