Skip to content

Commit 4d0538d

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: ufs: core: Use a host-wide tagset in SDB mode
In single-doorbell (SDB) mode there is only a single request queue. Hence, it doesn't matter whether or not the SCSI host tagset is configured as host-wide. Configure the host tagset as host-wide in SDB mode because this enables a simplification of the hot path. Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Peter Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent a48ca06 commit 4d0538d

3 files changed

Lines changed: 2 additions & 8 deletions

File tree

drivers/ufs/core/ufs-mcq.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,6 @@ EXPORT_SYMBOL_GPL(ufshcd_mcq_config_esi);
444444

445445
int ufshcd_mcq_init(struct ufs_hba *hba)
446446
{
447-
struct Scsi_Host *host = hba->host;
448447
struct ufs_hw_queue *hwq;
449448
int ret, i;
450449

@@ -478,7 +477,6 @@ int ufshcd_mcq_init(struct ufs_hba *hba)
478477
mutex_init(&hwq->sq_mutex);
479478
}
480479

481-
host->host_tagset = 1;
482480
return 0;
483481
}
484482

drivers/ufs/core/ufshcd-priv.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,7 @@ static inline bool ufs_is_valid_unit_desc_lun(struct ufs_dev_info *dev_info, u8
374374
*/
375375
static inline struct scsi_cmnd *ufshcd_tag_to_cmd(struct ufs_hba *hba, u32 tag)
376376
{
377-
/*
378-
* Host-wide tags are enabled in MCQ mode only. See also the
379-
* host->host_tagset assignment in ufs-mcq.c.
380-
*/
381-
struct blk_mq_tags *tags = hba->host->tag_set.shared_tags ?:
382-
hba->host->tag_set.tags[0];
377+
struct blk_mq_tags *tags = hba->host->tag_set.shared_tags;
383378
struct request *rq = blk_mq_tag_to_rq(tags, tag);
384379

385380
if (WARN_ON_ONCE(!rq))

drivers/ufs/core/ufshcd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9321,6 +9321,7 @@ static const struct scsi_host_template ufshcd_driver_template = {
93219321
.max_segment_size = PRDT_DATA_BYTE_COUNT_MAX,
93229322
.max_sectors = SZ_1M / SECTOR_SIZE,
93239323
.max_host_blocked = 1,
9324+
.host_tagset = true,
93249325
.track_queue_depth = 1,
93259326
.skip_settle_delay = 1,
93269327
.sdev_groups = ufshcd_driver_groups,

0 commit comments

Comments
 (0)